Cleanup play method

This commit is contained in:
Thomas Adamcik 2010-02-20 04:26:20 +01:00
parent 2392567d08
commit 95ea3daa35

View File

@ -71,10 +71,11 @@ class GStreamerPlaybackController(BasePlaybackController):
if track:
self.current_track = track
elif not self.current_track and not playlist.tracks:
elif not self.current_track:
self.current_track = self.next_track
if not self.current_track:
return False
elif playlist.tracks:
self.current_track = playlist.tracks[0]
self._bin.set_state(gst.STATE_READY)
self._bin.set_property('uri', self.current_track.uri)