use toggle_play in MPRISInterface.PlayPause

This commit is contained in:
Martin Wagner 2020-12-24 15:22:54 +01:00
parent 170165e0fd
commit 0269fa87f0

View File

@ -327,11 +327,7 @@ class MPRISInterface: # TODO emit Seeked if needed
self._client.wrapped_call("pause", 1)
def PlayPause(self):
status=self._client.wrapped_call("status")
if status["state"] == "play":
self._client.wrapped_call("pause", 1)
else:
self._client.wrapped_call("play")
self._client.wrapped_call("toggle_play")
def Stop(self):
self._client.wrapped_call("stop")