Comment 2 for bug 1801505

Revision history for this message
moma (osmoma) wrote :

Re-hi,

I made a quick debug of the src/dbus-mpris2.[ch] module and I can see that Spotify-1 sends the same message several times. Spotify can do the right thing all the time.

Audio-recorder should handle the situation.
Problem is that some other media-players (like Totem, Amarok, Clementin, Rhythmbox, etc.) may function slightly differently. I need to find a solution that works for all.

Some debug data from DBus:

g-signal: Received PropertiesChanged signal from org.mpris.MediaPlayer2.spotify.
Data is:('org.mpris.MediaPlayer2.Player', {'Metadata': <{'mpris:trackid': <'spotify:track:2Y73798F4zbbbvKT02fbtE'>, 'mpris:length': <uint64 185652000>, 'mpris:artUrl': <'https://open.spotify.com/image/4d331421124680709159a394b236fd4186c5ef57'>, 'xesam:album': <'Finalidade Era Ficar em Casa'>, 'xesam:albumArtist': <['MC Kevin o Chris']>, 'xesam:artist': <['MC Kevin o Chris']>, 'xesam:autoRating': <0.76000000000000001>, 'xesam:discNumber': <1>, 'xesam:title': <'Finalidade Era Ficar em Casa'>, 'xesam:trackNumber': <1>, 'xesam:url': <'https://open.spotify.com/track/2Y73798F4zbbbvKT02fbtE'>}>, 'PlaybackStatus': <'Playing'>}, @as [])
...
...
...
g-signal: Received PropertiesChanged signal from org.mpris.MediaPlayer2.spotify.
Data is:('org.mpris.MediaPlayer2.Player', {'Metadata': <{'mpris:trackid': <'spotify:track:2Y73798F4zbbbvKT02fbtE'>, 'mpris:length': <uint64 185652000>, 'mpris:artUrl': <'https://open.spotify.com/image/4d331421124680709159a394b236fd4186c5ef57'>, 'xesam:album': <'Finalidade Era Ficar em Casa'>, 'xesam:albumArtist': <['MC Kevin o Chris']>, 'xesam:artist': <['MC Kevin o Chris']>, 'xesam:autoRating': <0.76000000000000001>, 'xesam:discNumber': <1>, 'xesam:title': <'Finalidade Era Ficar em Casa'>, 'xesam:trackNumber': <1>, 'xesam:url': <'https://open.spotify.com/track/2Y73798F4zbbbvKT02fbtE'>}>, 'PlaybackStatus': <'Playing'>}, @as [])

----------------------------
And when stopping or pausing:

g-signal: Received PropertiesChanged signal from org.mpris.MediaPlayer2.spotify.
Data is:('org.mpris.MediaPlayer2.Player', {'Metadata': <{'mpris:trackid': <'spotify:track:2Y73798F4zbbbvKT02fbtE'>, 'mpris:length': <uint64 185652000>, 'mpris:artUrl': <'https://open.spotify.com/image/4d331421124680709159a394b236fd4186c5ef57'>, 'xesam:album': <'Finalidade Era Ficar em Casa'>, 'xesam:albumArtist': <['MC Kevin o Chris']>, 'xesam:artist': <['MC Kevin o Chris']>, 'xesam:autoRating': <0.76000000000000001>, 'xesam:discNumber': <1>, 'xesam:title': <'Finalidade Era Ficar em Casa'>, 'xesam:trackNumber': <1>, 'xesam:url': <'https://open.spotify.com/track/2Y73798F4zbbbvKT02fbtE'>}>, 'PlaybackStatus': <'Paused'>}, @as [])