Handle case when current_track is not set in gstreamer play
This commit is contained in:
parent
081c35ebea
commit
541017fa24
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user