Bug 109774

Summary: existing playlist breaks at adding new songs
Product: [Applications] amarok Reporter: Harald Sitter <sitter>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.3-SVN   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Harald Sitter 2005-07-28 16:22:19 UTC
Version:           1.3-SVN (using KDE KDE 3.4.1)
Installed from:    SuSE RPMs
Compiler:          3.3.5  20050117 (prerelease) (SUSE Linux)
OS:                Linux

If I add files to a saved playlist, the playlist becomes broken.
How to reproduce:
In the Playlistbrowser -> save -> current playlist -> letz call it 'ONE' -> the file is a valid m3u in ~/.kde/share/apps/amarok/playlists 

 #EXTM3U
 #EXTINF:396,Politik
 /multimedia/music/Coldplay/Live 2003/Coldplay - Politik.mp3
 #EXTINF:261,The Scientist
 /multimedia/music/Coldplay/Live 2003/Coldplay - The Scientist (acoustic).mp3
 #EXTINF:308,One I Love
 /multimedia/music/Coldplay/Live 2003/Coldplay - One I Love.mp3
 #EXTINF:325,Shiver
 /multimedia/music/Coldplay/Live 2003/Coldplay - Shiver.mp3
 #EXTINF:279,Sunday Bloody Sunday
 /multimedia/music/u2/U2 - Sunday Bloody Sunday.mp3
 #EXTINF:182,Sweetest Thing (The Single mix)
 /multimedia/music/u2/U2 - Sweetest Thing.mp3
 #EXTINF:244,Beautiful Day
 /multimedia/music/u2/U2 - Beautiful Day .mp3
 #EXTINF:296,With or Without You
 /multimedia/music/u2/U2 - With Or Without You.mp3

-> add some files from the current playlist to 'ONE' by drag'n'drop them -> save 'ONE' with the 'save' entry in the RMB menu in the playlist browser -> 'ONE' is now no more valid 

 File=/multimedia/music/Coldplay/Live 2003/Coldplay - Politik.mp3
 Title=Politik
 Length=396
 File=/multimedia/music/Coldplay/Live 2003/Coldplay - The Scientist (acoustic).mp3
 Title=The Scientist
 Length=261
 File=/multimedia/music/Coldplay/Live 2003/Coldplay - One I Love.mp3
 Title=One I Love
 Length=308
 File=/multimedia/music/Coldplay/Live 2003/Coldplay - Shiver.mp3
 Title=Shiver
 Length=325
 File=/multimedia/music/u2/U2 - Sunday Bloody Sunday.mp3
 Title=Sunday Bloody Sunday
 Length=279
 File=/multimedia/music/u2/U2 - Sweetest Thing.mp3
 Title=Sweetest Thing (The Single mix)
 Length=182
 File=/multimedia/music/u2/U2 - Beautiful Day .mp3
 Title=Beautiful Day
 Length=244
 File=/multimedia/music/u2/U2 - With Or Without You.mp3
 Title=With or Without You
 Length=296
 File=/multimedia/music/Flogging Molly/Flogging Molly - Drunken Lullabies.mp3
 Title=Drunken Lullabies
 Length=231
 File=/multimedia/music/Flogging Molly/Flogging Molly - Salty Dog.mp3
 Title=Salty Dog
 Length=141
 File=/multimedia/music/Flogging Molly/Flogging Molly - Never Met A Girl Like You Before.mp3
 Title=Never Met A Girl Like You Before
 Length=216
 File=/multimedia/music/Flogging Molly/Flogging Molly - Rebels of the Sacred Heart.mp3
 Title=Rebels of the Sacred Heart
 Length=319

if you delete it now and re-add it or just restart amaroK then the playlist will be unuseable which is VERY annoying :/
Comment 1 Kristjan Ugrin 2005-07-29 16:35:39 UTC
Confirmed! This must be fixed immediatelly.
Comment 2 Alexandre Oliveira 2005-08-07 22:56:43 UTC
SVN commit 443905 by aoliveira:

Fixing a typo that would make amaroK break .m3u playlists, saving them with other format.
BUG: 109774


 M  +1 -1      playlistbrowser.cpp  


--- trunk/extragear/multimedia/amarok/src/playlistbrowser.cpp #443904:443905
@@ -1460,7 +1460,7 @@
 
     //save the modified playlist in m3u or pls format
     const QString ext = fileExtension( item->url().path() );
-    if( ext.lower() == ".m3u" )
+    if( ext.lower() == "m3u" )
         saveM3U( item, append );
     else
         savePLS( item, append );