[gnome-music] player.py: Fix repeat/shuffle starting on next song
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] player.py: Fix repeat/shuffle starting on next song
- Date: Mon, 16 Jan 2017 10:42:11 +0000 (UTC)
commit 4529b4f24c9c20dd2e85d20f622cfe5cb9aa6751
Author: Sambhav Kothari <sambhavs email gmail com>
Date: Thu Dec 8 20:43:23 2016 +0530
player.py: Fix repeat/shuffle starting on next song
Song repeat/shuffle were only taking effect from the next song on when
changed mid-song. Make sure to validate and set the next track on a
changed repeat setting as well. Also fix play_next() to use the set
nextTrack variable instead of calling _get_next_track() rendering the
validation process moot.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=772975
gnomemusic/player.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 6ccb2a4..2b9ca44 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -243,6 +243,7 @@ class Player(GObject.GObject):
self.repeat = settings.get_enum('repeat')
self._sync_prev_next()
self._sync_repeat_image()
+ self._validate_next_track()
@log
def _on_bus_state_changed(self, bus, message):
@@ -713,7 +714,7 @@ class Player(GObject.GObject):
return True
self.stop()
- self.currentTrack = self._get_next_track()
+ self.currentTrack = self.nextTrack
if self.currentTrack and self.currentTrack.valid():
self.currentTrackUri = self.playlist.get_value(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]