[gnome-music/wip/jfelder/player-fix-add-song] player: Fix add_song method
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/player-fix-add-song] player: Fix add_song method
- Date: Mon, 13 May 2019 21:08:49 +0000 (UTC)
commit 8de1a86d4566b6e2acddc9d7ba35d6218319785d
Author: Jean Felder <jfelder src gnome org>
Date: Mon May 13 22:57:16 2019 +0200
player: Fix add_song method
The current_index needs to be changed only if it is greater than the
song_index and not the reverse.
gnomemusic/player.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index e28bfe96..a02c799f 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -247,7 +247,7 @@ class PlayerPlaylist(GObject.GObject):
"""
item = [song, ValidationStatus.PENDING]
self._songs.insert(song_index, item)
- if song_index >= self._current_index:
+ if song_index <= self._current_index:
self._current_index += 1
self._validate_song(song_index)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]