MPRIS: Metadata mpris:trackid not a valid D-Bus object id (totem on Ubuntu 20.04)
I've seen this raised before (#383 (closed)) and it was closed with the comment that the new MPRIS plugin does not export trackid anymore. I am developing a small command-line app in Python that implements "chapters" (similar functionality to timestamps in Youtube videos) by leveraging the D-Bus MPRIS interface. It works for any media (videos or audio) that is running on D-Bus MPRIS enabled players. The code is relatively generic and hence player agnostic. It currently works well with both Rhythmbox and VLC (on Ubuntu 20.04) but fails for Totem as I'm unable to get a valid mpris:trackid via the Metadata property of a running totem player. The trackid is needed to call SetPosition(o: TrackId, x: Position) on the org.mpris.MediaPlayer2.Player interface (https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#methods).
Steps to verify the issue:
- Install D-Feet (https://wiki.gnome.org/Apps/DFeet/)
- Play a video on Totem (Videos app on Ubuntu 20.04)
- Run D-Feet and select the "Sesson Bus" (button located towards the top of the window)
- Search for "totem"
- Select the entry on the left pane with the string "org.mpris.MediaPlayer2.totem"
- On the right hand pane, expand "/org/mpris/MediaPlayer2" then expand "Interfaces" and finally expand "org.freedesktop.DBus.Properties"
- Under "Methods" select and double click on "Get(String interface_name, String property_name)->(Variant arg_2)"
- In the pop-up window, enter the following text under the "Method Input" (do not omit the comma between the two quoted strings below): "org.mpris.MediaPlayer2.Player", "Metadata"
- Click the "Execute" button at the bottom right of the pop-up window.
- Verify the value of 'mpris:trackid' in the "Method output" box. This is a file url and not a valid D-Bus object id.