GNOME Bugzilla – Bug 703303
Music doesn't properly tell MPRIS clients that the song is replayed when in repeat song mode
Last modified: 2013-09-16 08:41:50 UTC
When setting the repeat mode to song, MPRIS clients adds up the position instead of resetting to 0 when the song reaches the end and replays. To reproduce: 1. Play a song. 2. Set repeat mode to "repeat song". 3. Move position to end. Result: The current position is greater than duration in MPRIS clients. Expected: MPRIS clients should show that the new position is start of song. MediaPlayer2.Player interface of MPRIS says that Seeked signal "does not need to be emitted when playback starts or when the track changes, unless the track is starting at an unexpected position" so emitting it during start of playback is not the fix for this bug. So to fix it, we could check how Rhythmbox handles this, by checking the dbus messages/signals produced using dbus-monitor when the song ends. That song should be inside a playlist with it the only item inside. The repeat mode of Rhythmbox should be enabled. We have to do this because Rhythmbox doesn't have a repeat song mode.
Created attachment 254961 [details] [review] mpris: Seek to start when a song is loaded and in repeat song mode This makes sure that the current position will be reset when replaying the song. This seems like it doesn't follow the MPRIS specifications (no seeking when the media changes), but other media players do this too, so do it anyway.
Review of attachment 254961 [details] [review]: Tested, please commit
Comment on attachment 254961 [details] [review] mpris: Seek to start when a song is loaded and in repeat song mode Committed as 0da31ab5.