GNOME Bugzilla – Bug 740211
Add support for MPRIS TrackList
Last modified: 2014-11-18 11:45:19 UTC
The specification is here: http://specifications.freedesktop.org/mpris-spec/latest/Track_List_Interface.html GetTracksMetadata and GoTo methods are fully supported. AddTrack and RemoveTrack are not supported since we use Tracker and can't add and remove tracks. CanEditTracks is always 'False' because of the same reason. TrackAdded and TrackRemoved are not used because the data needed in TrackRemoved is unavailable immediately after the row in the GtkTreeModel is deleted (iter is not available in “row-deleted” signal). Instead, each add and remove emits TrackListReplaced. This is acceptable behavior according to TrackListReplaced's documentation: "It is left up to the implementation to decide when a change to the track list is invasive enough that this signal should be emitted instead of a series of TrackAdded and TrackRemoved signals." TrackMetadataChanged is not used since the views reload when metadata changes and we can't easily track them. Music doesn't have a tags editor anyway. Note that I have tested this manually because the GNOME Shell extension that I use for MPRIS doesn't support MPRIS TrackList. I've checked the behavior of Rhythmbox and VLC Media Player for comparison.
Created attachment 290791 [details] [review] player: Add new signal 'playlist-changed'
Created attachment 290792 [details] [review] mpris: Implement TrackList interface of MPRIS
Correction: Compared with VLC Media Player for TrackList and Rhythmbox for Playlists interface. VLC Media Player do not implement Playlists while Rhythmbox do not implement TrackList.
Thanks, pushed to master: https://git.gnome.org/browse/gnome-music/commit/?id=5c19436 and https://git.gnome.org/browse/gnome-music/commit/?id=76aa374