summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Felder <jfelder@src.gnome.org>2020-07-26 22:40:25 +0200
committerJean Felder <jfelder@src.gnome.org>2020-07-27 14:33:55 +0200
commitf933cc3dbddd1d24b14df129a1ebc5bedfe853d9 (patch)
tree91f8c13392033934d47a6b63409e0e41de750543
parenta4f283a9e40fbc3a8e5a69bf72594d3e617ce20e (diff)
mpris: Correctly update the tracklist on a repeat-mode change
The MPRIS tracklist is updated in two main cases: - the current song or the player playlist has changed - the repeat mode has changed The tracklist update logic needs the position of the current song. However, in the second case, the position value has not been updated yet. Therefore, the MPRIS tracklist is not correctly updated. This issue is fixed by manuelly calling the player's current_song property to force the update of the position.
-rw-r--r--gnomemusic/mpris.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 2ff588cd..275074e9 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -418,6 +418,9 @@ class MPRIS(DBusInterface):
return path
def _update_tracklist(self):
+ # FIXME: On a repeat-mode change, the current song needs to be queried
+ # to update the player position property.
+ self._player.props.current_song
previous_path_list = self._path_list
self._path_list = []
self._metadata_list = []