Bug 245963

Summary: Can not add tracks to existing m3u playlists via Media Sources (drag-n-drop)
Product: [Applications] amarok Reporter: Jedd <bko>
Component: Playlists/Saved PlaylistsAssignee: Amarok Developers <amarok-bugs-dist>
Severity: normal CC: bart.cerneels, nhn, shaddowy2, teo
Priority: NOR    
Version: 2.4.1   
Target Milestone: 2.4.2   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In: 2.4.2

Description Jedd 2010-07-28 01:11:16 UTC
Version:           2.3.1 (using KDE 4.4.5) 
OS:                Linux

This is something that worked in earlier (1.x) versions of Amarok.

An m3u file that the user has rw permissions to exists in the scanned directory path.  Navigating through Media Sources | Playlists | Saved Playlists - the contents of the m3u playlist can be seen.  Dragging file(s) from the current (main) playlist onto this filename.m3u should add the file(s) to the .m3u file - but it doesn't.  What happens instead is that the mouse cursor gets the little (+) next to it, which suggests it will add and that this is a droppable target.  After several seconds the 'Playlist Files on Disk' drop-down just hides itself / wraps up to just the heading.  On opening it up again and looking at the .m3u contents, the new tracks have not been added.

I see that using a .xspf in the default location (~/.kde/share/apps/amarok/playlists/...) WILL let me add files to it - it behaves as expected.

If I copy the .m3u file into the ~/.kde/share/apps/amarok/playlists directory and re-start amarok (or rescan) it discovers this file, presents it in the Playlist Files on Disk list, but shows it as empty.  An attempt to add file(s) to the .m3u playlist fails in the same way as above.

What I think should happen:
 o m3u playlists should be visible even in the .kde/.../playlists directory
 o m3u playlists should be editable in the same way that they used to be and that .xspf files currently are
 o adding a file to an m3u playlist should not hide the full Playlist Files On Disk listing (it takes ages to open this, even on a snappy machine with a local MySQL db)

Reproducible: Always

Steps to Reproduce:
Sorry - see above.  (Prolly should have read the entire form since the changes to b.k.o.)
Comment 1 shaddowy2 2011-01-23 15:14:14 UTC
I can confirm the bug for Amarok 2.4. I would like to see that feature of Amarok 1.4 back. It would make creating playlists easier :)
A workaround at the moment is to convert all your playlists to xspf format, I did it with a python script from http://users.musicbrainz.org/~matt/xspf/m3u2xspf
Comment 2 Myriam Schweingruber 2011-05-07 11:31:06 UTC
Could you please upgrade to a newer Amarok version and test again? Current is Amarok 2.4.0, Amarok 2.4.1 is to be released tomorrow.

Please report back.
Comment 3 shaddowy2 2011-05-13 10:35:24 UTC
I just tested Amarok 2.4.1 and the bug still exists. Your m3u playlists are shown (not empty as described above), but it's not possible to add tracks to it.
Comment 4 Myriam Schweingruber 2011-05-14 10:41:08 UTC
Thank you for the feedback.
Comment 5 Bart Cerneels 2011-07-12 09:07:25 UTC
Git commit c5a50a6a028dc952da794a0f4fb10db1beeae857 by Bart Cerneels.
Committed on 12/07/2011 at 10:03.
Pushed by shanachie into branch 'master'.

Enabled editing of M3U playlists

As a bonus implemented a more efficient save system for playlist-files.


M  +47   -2    src/core-impl/playlists/types/file/m3u/M3UPlaylist.cpp     
M  +4    -0    src/core-impl/playlists/types/file/m3u/M3UPlaylist.h     
M  +35   -0    src/playlistmanager/file/PlaylistFileProvider.cpp     
M  +14   -3    src/playlistmanager/file/PlaylistFileProvider.h