summaryrefslogtreecommitdiffstats
path: root/jukeboxactivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'jukeboxactivity.py')
-rwxr-xr-xjukeboxactivity.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/jukeboxactivity.py b/jukeboxactivity.py
index 1127bc5..565aa2e 100755
--- a/jukeboxactivity.py
+++ b/jukeboxactivity.py
@@ -113,12 +113,12 @@ class JukeboxActivity(activity.Activity):
except:
pass
- def _player_eos_cb(self, widget):
+ def songchange(self,direction):
if self.playflag:
self.playflag = False
return
self.player.seek(0L)
- if self.currentplaying < len(self.playlist) - 1:
+ if direction == "next" and self.currentplaying < len(self.playlist) - 1:
self.currentplaying += 1
self.player.stop()
self.player = GstPlayer(self.videowidget)
@@ -135,6 +135,10 @@ class JukeboxActivity(activity.Activity):
self.player.stop()
self.player.set_uri(None)
+
+ def _player_eos_cb(self, widget):
+ self.songchange('next')
+
def _player_error_cb(self, widget, message, detail):
self.player.stop()
self.player.set_uri(None)