Implemented play_or_stop in mpd
This commit is contained in:
parent
c830988e09
commit
26c3afee68
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ class MusicMpdPlugin(MusicPlugin):
|
||||||
def stop(self):
|
def stop(self):
|
||||||
return self._exec('stop')
|
return self._exec('stop')
|
||||||
|
|
||||||
|
def play_or_stop(self):
|
||||||
|
status = self.status().output['state']
|
||||||
|
if status == 'play': return self._exec('stop')
|
||||||
|
else: return self._exec('play')
|
||||||
|
|
||||||
def next(self):
|
def next(self):
|
||||||
return self._exec('next')
|
return self._exec('next')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue