[gnome-music/3-32-fix-repeat-mode-song] player: Fix repeat song mode



commit 71fc29855ea00108f2e4a4c7aed7cf1259b88871
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.
    
    Closes: #266
    (cherry picked from commit fcebe9ec2b7d2161b56cbbe3bc7434a95ce7bf1e)

 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]