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.
This commit is contained in:
Dustin C. Hatch
2014-08-06 16:04:03 -05:00
parent 40e7f99aa3
commit 79e4f603ae

View File

@@ -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()