Draft: Playlists in UI
This adds the ability to list and control playlists from the UI.
Motivation
According to the VDG guidelines, the target user wants to "easily create and play an arbitrary collection of songs of her choosing", which is currently limited to saving your song queue to a file and loading it back, there's no straight-forward option to list, delete, and modify existing playlists.
Moreover, some of the screenshots have a "Playlists" entry in the side menu.
This has also been requested on Bugzilla. (406477)
Implementation
Internally, I'm planning to use the existing support for .m3u8
files to store playlists.
When the track file scanner runs it also adds the playlists it finds to the database, and we could store playlists in a Elisa Playlists
(which would need to be added to the indexer's watched paths) folder in ~/.local/share
or in the user's Music folder.
A few notes on the implementation:
- Alongside tracks and radios, I'm also storing playlists in the SQLite database. Right now it's just a pair of ID and a file path, though I'm wondering whether I should store the track list in the database entry (and watch for modifications) as well or just load the file when the playlist is opened or enqueued.
- Another idea I had was to store playlists in the database as a property of the tracks they contain, and then filter tracks by playlist to display the items in the UI, essentially behaving the same way as albums, genres, and artists.