[gnome-music/wip/jfelder/fix-repeat-mode-song] player: Fix repeat song mode
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/fix-repeat-mode-song] player: Fix repeat song mode
- Date: Mon, 1 Apr 2019 09:23:05 +0000 (UTC)
commit e9f05212ce725c5457c70e43eb0d5a3b1ae272d7
Author: Jean Felder <jfelder src gnome org>
Date: Mon Apr 1 10:50:16 2019 +0200
player: Fix repeat song mode
Commits 7a7db137 and b6467bf4 fixed an issue with the player: it was
impossible to change the current song when the player was on
pause. However, it broke the repeat song mode.
Indeed, at the end of a song, a new song is loaded only if the song
url has changed. But, if the repeat song mode is set, the url is
unchanged.
Adding a check to test if the repeat mode is the song one fixes the
issue.
gnomemusic/player.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 67214a83..a2e7c89c 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -665,7 +665,8 @@ class Player(GObject.GObject):
return False
url = self._playlist.props.current_song.get_url()
- if url != self._gst_player.props.url:
+ if (url != self._gst_player.props.url
+ or self._repeat == RepeatMode.SONG):
self._load(self._playlist.props.current_song)
self._gst_player.props.state = Playback.PLAYING
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]