Handle case when current_track is not set in gstreamer play

This commit is contained in:
Thomas Adamcik 2010-02-07 05:11:39 +01:00
parent 081c35ebea
commit 541017fa24

View File

@ -28,5 +28,10 @@ class GStreamerPlaybackController(BasePlaybackController):
self.bin = bin
def play(self, id=None, position=None):
if not self.current_track:
return False
self.bin.set_property("uri", self.current_track.uri)
self.bin.set_state(self.PLAYING)
return True