[gnome-music/wip/mschraal/gapless-v3: 11/14] player: Small optimization
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gapless-v3: 11/14] player: Small optimization
- Date: Sun, 21 Oct 2018 22:32:00 +0000 (UTC)
commit c5e1387e60d2923b8bdc11fb38db991c3afd25c0
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Aug 30 16:41:35 2018 +0200
player: Small optimization
gnomemusic/player.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index e0f89c5d..59004392 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -588,17 +588,14 @@ class Player(GObject.GObject):
@log
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._gst_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]