Autor Beitrag
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Sa 28.10.06 16:05 
Hi,
weiß jemand wie man m3u playlisten speichern kann??
Wie man sie laden kann habe ich schon gefunden
Leuchtturm

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 28.10.06 16:43 
Ich seh schon, so Stück für Stück geb ich meinen kompletten Code raus :lol:

Variablen hab ich weggelassen - bei mir ist die Prozedur etwas länger, da ich auch pls speichern kann ;-)
Zu beachten ist, dass bei mir die Playlist eine tObjectList ist, die lauter tAudioFiles enthält. Wie du die Daten organisierst, weiß ich natürlcih nicht.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure SavePlaylist(filename: String);
//var ...
begin
      myAList := TStringList.Create;
      myAList.Add('#EXTM3U');
      for i := 0 to PlayList.Count - 1 do
      begin
        aAudiofile := Playlist[i] as TAudiofile;
        myAList.add('#EXTINF:' + IntTostr(aAudiofile.Dauer) + ','
              + aAudioFile.Artist + ' - ' + aAudioFile.Titel);
        myAList.Add(ExtractRelativePath(FileName, aAudioFile.Pfad ));
      end;
      myAList.SaveToFile(FileName);
      myAList.Free;
end;

_________________
We are, we were and will not be.
Leuchtturm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Sa 28.10.06 17:04 
user profile iconGausi hat folgendes geschrieben:
Ich seh schon, so Stück für Stück geb ich meinen kompletten Code raus :lol:

:oops: Nein so ist das nicht, das ist der erste Code :wink:


user profile iconGausi hat folgendes geschrieben:
Ich seh schon, so Stück für Stück geb ich meinen kompletten Code raus :lol:

Variablen hab ich weggelassen - bei mir ist die Prozedur etwas länger, da ich auch pls speichern kann ;-)
Zu beachten ist, dass bei mir die Playlist eine tObjectList ist, die lauter tAudioFiles enthält. Wie du die Daten organisierst, weiß ich natürlcih nicht.

Danke :zustimm:

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.