Automatically switch mpd between resume and start playing on media_play (#37854)
* Automatically switch between resume and start playing * Fix Black issue Weirdly when i run it i had an error `1544 files left unchanged, 3313 files failed to reformat.` I didn't watch the commit check output afterward.pull/37467/head
parent
3e9f2b8246
commit
353817337e
|
@ -307,7 +307,10 @@ class MpdDevice(MediaPlayerEntity):
|
|||
|
||||
def media_play(self):
|
||||
"""Service to send the MPD the command for play/pause."""
|
||||
self._client.pause(0)
|
||||
if self._status["state"] == "pause":
|
||||
self._client.pause(0)
|
||||
else:
|
||||
self._client.play()
|
||||
|
||||
def media_pause(self):
|
||||
"""Service to send the MPD the command for play/pause."""
|
||||
|
|
Loading…
Reference in New Issue