[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src
From:       Alexandre Pereira de Oliveira <aoliveira () kdemail ! net>
Date:       2006-03-01 3:15:02
Message-ID: 1141182902.409246.12038.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 514695 by aoliveira:

Isn't it better when Playlist Browser writes PLS playlists that amaroK can actually understand? :-)
BUG: 122875


 M  +7 -4      playlistbrowser.cpp  


--- trunk/extragear/multimedia/amarok/src/playlistbrowser.cpp #514694:514695
@@ -1948,17 +1948,20 @@
     {
         QTextStream stream( &file );
         QPtrList<TrackItemInfo> trackList = append ? item->droppedTracks() : item->trackList();
-        for( TrackItemInfo *info = trackList.first(); info; info = trackList.next() )
+        stream << "NumberOfEntries=" << trackList.count() << endl;
+        int c=1;
+        for( TrackItemInfo *info = trackList.first(); info; info = trackList.next(), ++c )
         {
-            stream << "File=";
+            stream << "File" << c << "=";
             stream << (info->url().protocol() == "file" ? info->url().path() : info->url().url());
-            stream << "\nTitle=";
+            stream << "\nTitle" << c << "=";
             stream << info->title();
-            stream << "\nLength=";
+            stream << "\nLength" << c << "=";
             stream << info->length();
             stream << "\n";
         }
 
+        stream << "Version=2\n";
         file.close();
     }
 }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic