[gnome-music/wip/jfelder/3-32-revert-player-load-changes] player: Revert to previous load mechanism



commit 26b2e706d44da92ca7eaa40c98e6c4f5bb608263
Author: Jean Felder <jfelder src gnome org>
Date:   Mon May 6 14:16:15 2019 +0200

    player: Revert to previous load mechanism
    
    The Music 3.32 initial release contained an issue with the logic to
    handle song loading. It was impossible to switch to the next song
    while another song was on pause (see #256).
    Some fixes have been introduced and backported to the 3.32 codebase to
    fix the issue but each one of them introduced an other issue. Either
    the repeat mode does not work correctly (see #278) or resuming
    playback restarts the current song (see #280).
    
    As the initial issue is probably the least frequent and annoying one,
    switching back to the previous mechanism seems like the best course
    action.

 gnomemusic/player.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 15ad9cf6..52ad2458 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -664,10 +664,7 @@ class Player(GObject.GObject):
                 and not self._playlist.set_song(song_offset)):
             return False
 
-        url = self._playlist.props.current_song.get_url()
-        loop_modes = [RepeatMode.SONG, RepeatMode.ALL]
-        if (url != self._gst_player.props.url
-                or self._repeat in loop_modes):
+        if self.props.state != Playback.PAUSED:
             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]