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 playpause():
|
||||
status = self.client.status()
|
||||
pause = int(status['state'] == 'play')
|
||||
self.client.pause(pause)
|
||||
if status['state'] == 'stop':
|
||||
self.client.play()
|
||||
else:
|
||||
self.client.pause()
|
||||
|
||||
def volume_down():
|
||||
status = self.client.status()
|
||||
|
|
Loading…
Reference in New Issue