Fix play/pause when stopped
Sending the 'pause' command has no effect if the player is currently stopped. Thus, 'play' must be sent explicitly in that case.master
parent
40e7f99aa3
commit
79e4f603ae
|
@ -147,8 +147,10 @@ class Notifier(object):
|
||||||
def bind_keys(self):
|
def bind_keys(self):
|
||||||
def playpause():
|
def playpause():
|
||||||
status = self.client.status()
|
status = self.client.status()
|
||||||
pause = int(status['state'] == 'play')
|
if status['state'] == 'stop':
|
||||||
self.client.pause(pause)
|
self.client.play()
|
||||||
|
else:
|
||||||
|
self.client.pause()
|
||||||
|
|
||||||
def volume_down():
|
def volume_down():
|
||||||
status = self.client.status()
|
status = self.client.status()
|
||||||
|
|
Loading…
Reference in New Issue