diff options
author | Kushal Das <kushal@fedoraproject.org> | 2008-10-03 14:37:47 +0530 |
---|---|---|
committer | Kushal Das <kushal@fedoraproject.org> | 2008-10-03 14:37:47 +0530 |
commit | 05aa6f4ff4ae4b366f0a1d9617c67d7243f7157d (patch) | |
tree | 5a44dd8e11d25b915cc12f0d0cee68655904bf8b | |
parent | 7d0f9b5db12528e06980bd92d05c763987d0e622 (diff) | |
download | jukebox-activity.git-05aa6f4ff4ae4b366f0a1d9617c67d7243f7157d.tar.gz jukebox-activity.git-05aa6f4ff4ae4b366f0a1d9617c67d7243f7157d.tar.xz jukebox-activity.git-05aa6f4ff4ae4b366f0a1d9617c67d7243f7157d.zip |
Now we have a method called songchange, which we can use for next and previous buttons
-rwxr-xr-x | jukeboxactivity.py | 8 |
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) |