From 0269fa87f0ee19c4a768da3f15045097efd40fbd Mon Sep 17 00:00:00 2001 From: Martin Wagner Date: Thu, 24 Dec 2020 15:22:54 +0100 Subject: [PATCH] use toggle_play in MPRISInterface.PlayPause --- bin/mpdevil | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/mpdevil b/bin/mpdevil index e6f32a9..2ebd99c 100755 --- a/bin/mpdevil +++ b/bin/mpdevil @@ -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")