[gnome-music/wip/jfelder/player-simplify-eos] player: Simplify _on_eos method
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/player-simplify-eos] player: Simplify _on_eos method
- Date: Tue, 30 Apr 2019 14:13:14 +0000 (UTC)
commit 8233cbf93dae44abeb799adbb88360b5161a0ccd
Author: Jean Felder <jfelder src gnome org>
Date: Tue Apr 30 16:06:13 2019 +0200
player: Simplify _on_eos method
on_glib_idle function does exactly the same thing as the next
method. So, it can be directly replaced by a call to the next method.
gnomemusic/player.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 07f362e9..890c32b1 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -628,12 +628,8 @@ class Player(GObject.GObject):
@log
def _on_eos(self, klass):
- def on_glib_idle():
- self._playlist.next()
- self.play()
-
if self.props.has_next:
- GLib.idle_add(on_glib_idle)
+ GLib.idle_add(self.next)
else:
self.stop()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]