diff options
-rw-r--r-- | jukeboxactivity.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jukeboxactivity.py b/jukeboxactivity.py index 8bb320e..998d635 100644 --- a/jukeboxactivity.py +++ b/jukeboxactivity.py @@ -47,6 +47,7 @@ import pygtk pygtk.require('2.0') import gobject +gobject.threads_init() import pygst pygst.require('0.10') @@ -271,6 +272,7 @@ class JukeboxActivity(activity.Activity): # self.playflag = False # return self.player.seek(0L) + self.player.stop() if direction == "prev" and self.currentplaying > 0: self.play(self.currentplaying - 1) logging.info("prev: " + self.playlist[self.currentplaying]['url']) @@ -850,7 +852,8 @@ class GstPlayer(gobject.GObject): self.error = False def stop(self): - self.player.set_state(gst.STATE_NULL) + self.player.set_state(gst.STATE_READY) + # self.player.set_state(gst.STATE_NULL) logging.debug("stopped player") def get_state(self, timeout=1): |