Closed tatokis closed 5 years ago
This PR adds support for the MPRIS DBus spec, as well as desktop integration using XDG. Some examples:
$ dbus-send --print-reply --dest=org.mpris.MediaPlayer2.vgmplay /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:Metadata method return time=1562058434.358467 sender=:1.17860 -> destination=:1.17862 serial=29 reply_serial=2 variant array [ dict entry( string "mpris:trackid" variant string "/org/mpris/MediaPlayer2/CurrentTrack" ) dict entry( string "xesam:url" variant string "file:///home/tatokis/%CE%95%CF%80%CE%B9%CF%86%CE%AC%CE%BD%CE%B5%CE%B9%CE%B1%20%CE%B5%CF%81%CE%B3%CE%B1%CF%83%CE%AF%CE%B1%CF%82/VGM/Mega%20Turrican/03%20-%20Stage%201-1.vgz" ) dict entry( string "mpris:artUrl" variant string "file:///home/tatokis/%CE%95%CF%80%CE%B9%CF%86%CE%AC%CE%BD%CE%B5%CE%B9%CE%B1%20%CE%B5%CF%81%CE%B3%CE%B1%CF%83%CE%AF%CE%B1%CF%82/VGM/Mega%20Turrican/Mega%20Turrican.png" ) dict entry( string "xesam:lastused" variant string "2018-01-04T12:21:32Z" ) dict entry( string "xesam:genre" variant array [ string "Video Game Music" ] ) dict entry( string "xesam:album" variant string "Mega Turrican" ) dict entry( string "xesam:title" variant string "Stage 1-1" ) dict entry( string "mpris:length" variant int64 188850333 ) dict entry( string "xesam:artist" variant array [ string "Chris Hülsbeck" ] ) dict entry( string "xesam:composer" variant array [ string "Chris Hülsbeck" ] ) dict entry( string "xesam:trackNumber" variant int32 3 ) dict entry( string "xesam:discNumber" variant int32 1 ) dict entry( string "xesam:useCount" variant int32 0 ) dict entry( string "xesam:userRating" variant double 0 ) dict entry( string "vgm:release" variant string "1994/06/07" ) dict entry( string "vgm:creator" variant string "2ch-N" ) dict entry( string "vgm:system" variant string "Sega Mega Drive" ) dict entry( string "vgm:version" variant uint32 336 ) dict entry( string "vgm:loop" variant int64 158760000 ) dict entry( string "vgm:chips" variant array [ string "SEGA PSG" string "YM2612" ] ) ]
This PR adds support for the MPRIS DBus spec, as well as desktop integration using XDG. Some examples: