Extend DummyPlaybackController to be able to return False on _play, _next, _previous
This commit is contained in:
parent
d975945eb0
commit
ada3fcd726
@ -44,16 +44,19 @@ class DummyLibraryController(BaseLibraryController):
|
|||||||
|
|
||||||
class DummyPlaybackController(BasePlaybackController):
|
class DummyPlaybackController(BasePlaybackController):
|
||||||
def _next(self, track):
|
def _next(self, track):
|
||||||
return True
|
"""Pass None as track to force failure"""
|
||||||
|
return track is not None
|
||||||
|
|
||||||
def _pause(self):
|
def _pause(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _play(self, track):
|
def _play(self, track):
|
||||||
return True
|
"""Pass None as track to force failure"""
|
||||||
|
return track is not None
|
||||||
|
|
||||||
def _previous(self, track):
|
def _previous(self, track):
|
||||||
return True
|
"""Pass None as track to force failure"""
|
||||||
|
return track is not None
|
||||||
|
|
||||||
def _resume(self):
|
def _resume(self):
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user