[gnome-music/wip/mschraal/gapless-v3: 83/83] player: Small optimization



commit 5bb34647c26e924d39dd6c6a60b8307a37d623cc
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Aug 30 16:41:35 2018 +0200

    player: Small optimization

 gnomemusic/player.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 99fc6f17..83f7a3b2 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -582,12 +582,11 @@ class Player(GObject.GObject):
     def _on_eos(self, klass, gapless=False):
         print("eos, gapless:", gapless)
         def on_glib_idle():
-            self._playlist.next()
             self.play()
 
         if self.props.has_next:
+            self._playlist.next()
             if gapless:
-                self._playlist.next()
                 new_url = self._playlist.props.current_song.get_url()
                 self._player.props.url = new_url
             else:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]