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 [])
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. mpris.MediaPlay er2.Player' , {'Metadata': <{'mpris:trackid': <'spotify: track:2Y73798F4 zbbbvKT02fbtE' >, 'mpris:length': <uint64 185652000>, 'mpris:artUrl': <'https:/ /open.spotify. com/image/ 4d3314211246807 09159a394b236fd 4186c5ef57'>, 'xesam:album': <'Finalidade Era Ficar em Casa'>, 'xesam: albumArtist' : <['MC Kevin o Chris']>, 'xesam:artist': <['MC Kevin o Chris']>, 'xesam:autoRating': <0.760000000000 00001>, 'xesam:discNumber': <1>, 'xesam:title': <'Finalidade Era Ficar em Casa'>, 'xesam: trackNumber' : <1>, 'xesam:url': <'https:/ /open.spotify. com/track/ 2Y73798F4zbbbvK T02fbtE'>}>, 'PlaybackStatus': <'Playing'>}, @as []) MediaPlayer2. spotify. mpris.MediaPlay er2.Player' , {'Metadata': <{'mpris:trackid': <'spotify: track:2Y73798F4 zbbbvKT02fbtE' >, 'mpris:length': <uint64 185652000>, 'mpris:artUrl': <'https:/ /open.spotify. com/image/ 4d3314211246807 09159a394b236fd 4186c5ef57'>, 'xesam:album': <'Finalidade Era Ficar em Casa'>, 'xesam: albumArtist' : <['MC Kevin o Chris']>, 'xesam:artist': <['MC Kevin o Chris']>, 'xesam:autoRating': <0.760000000000 00001>, 'xesam:discNumber': <1>, 'xesam:title': <'Finalidade Era Ficar em Casa'>, 'xesam: trackNumber' : <1>, 'xesam:url': <'https:/ /open.spotify. com/track/ 2Y73798F4zbbbvK T02fbtE'>}>, 'PlaybackStatus': <'Playing'>}, @as [])
Data is:('org.
...
...
...
g-signal: Received PropertiesChanged signal from org.mpris.
Data is:('org.
------- ------- ------- -------
And when stopping or pausing:
g-signal: Received PropertiesChanged signal from org.mpris. MediaPlayer2. spotify. mpris.MediaPlay er2.Player' , {'Metadata': <{'mpris:trackid': <'spotify: track:2Y73798F4 zbbbvKT02fbtE' >, 'mpris:length': <uint64 185652000>, 'mpris:artUrl': <'https:/ /open.spotify. com/image/ 4d3314211246807 09159a394b236fd 4186c5ef57'>, 'xesam:album': <'Finalidade Era Ficar em Casa'>, 'xesam: albumArtist' : <['MC Kevin o Chris']>, 'xesam:artist': <['MC Kevin o Chris']>, 'xesam:autoRating': <0.760000000000 00001>, 'xesam:discNumber': <1>, 'xesam:title': <'Finalidade Era Ficar em Casa'>, 'xesam: trackNumber' : <1>, 'xesam:url': <'https:/ /open.spotify. com/track/ 2Y73798F4zbbbvK T02fbtE'>}>, 'PlaybackStatus': <'Paused'>}, @as [])
Data is:('org.