[gnome-music/wip/mschraal/gapless-v3: 15/18] more optimization



commit 700943ea7d109a74e0c7efb960fab1837db0c896
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Oct 18 00:39:42 2018 +0200

    more optimization

 gnomemusic/player.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 71706621..1a9a2b93 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -588,8 +588,6 @@ class Player(GObject.GObject):
     @log
     def _on_eos(self, klass, gapless=False):
         print("eos, gapless:", gapless)
-        def on_glib_idle():
-            self.play()
 
         if self.props.has_next:
             self._playlist.next()
@@ -597,7 +595,7 @@ class Player(GObject.GObject):
                 new_url = self._playlist.props.current_song.get_url()
                 self._player.props.url = new_url
             else:
-                GLib.idle_add(on_glib_idle)
+                GLib.idle_add(self.play)
         else:
             GLib.idle_add(self.stop)
 


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