GNOME Bugzilla – Bug 729309
Add support for MPRIS Playlists
Last modified: 2014-11-18 11:44:45 UTC
It would be nice if we could add support for MPRIS Playlists too, so we don't have to go to the Music window if we want to play a certain playlist. The specification is here: http://specifications.freedesktop.org/mpris-spec/latest/Playlists_Interface.html I didn't implement this yet because I'm looking for a good value for Playlist_Id fields. If we use Tracker to save Playlists, we could probably use the tracker:id field for that, just like what we do for songs.
Created attachment 290794 [details] [review] view: Add method to play a playlist in Playlists view Note: Should we show the Playlists view when the user selects a playlist via an MPRIS client? That's how it works in Rhythmbox.
Created attachment 290795 [details] [review] mpris: Implement Playlists interface of MPRIS
Created attachment 290801 [details] [review] mpris: Implement Playlists interface of MPRIS Fixed python3-flake8 errors.
Notes: * Playlists are only loaded after grilo is 'ready' (Tracker is loaded) * Playlists are populated into an array since populate is asynchronous while DBus methods and properties are synchronous * PlaylistChanged is unused since Music doesn't support playlist renaming * No playlist icons are provided to MPRIS clients * When there is no active playlist, the object path is undefined, so I just used /org/mpris/MediaPlayer2/Playlist/Invalid similar to NoTrack in TrackList * The only supported ordering is Alphabetical. Should we support the other orderings? It is possible to support all of the possible orderings except UserDefined but we need additional arrays for each ordering since populate is asynchronous.
Looks good, pushed to master: https://git.gnome.org/browse/gnome-music/commit/?id=d5aff13 and https://git.gnome.org/browse/gnome-music/commit/?id=88a9d90