Added play_if_paused_or_stopped method to mpd plugin
This commit is contained in:
parent
13c1895295
commit
b88f7fcecc
1 changed files with 8 additions and 0 deletions
|
@ -87,6 +87,14 @@ class MusicMpdPlugin(MusicPlugin):
|
||||||
if status == 'pause':
|
if status == 'pause':
|
||||||
return self._exec('play')
|
return self._exec('play')
|
||||||
|
|
||||||
|
@action
|
||||||
|
def play_if_paused_or_stopped(self):
|
||||||
|
""" Play only if it's paused or stopped """
|
||||||
|
|
||||||
|
status = self.status().output['state']
|
||||||
|
if status == 'pause' or status == 'stop':
|
||||||
|
return self._exec('play')
|
||||||
|
|
||||||
@action
|
@action
|
||||||
def stop(self):
|
def stop(self):
|
||||||
""" Stop playback """
|
""" Stop playback """
|
||||||
|
|
Loading…
Reference in a new issue