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



commit 6b9c6fdc5f90bce372e39b14672dbfd75522a42f
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 e60c5a15..71706621 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -589,12 +589,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]