mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
use toggle_play in MPRISInterface.PlayPause
This commit is contained in:
parent
170165e0fd
commit
0269fa87f0
@ -327,11 +327,7 @@ class MPRISInterface: # TODO emit Seeked if needed
|
|||||||
self._client.wrapped_call("pause", 1)
|
self._client.wrapped_call("pause", 1)
|
||||||
|
|
||||||
def PlayPause(self):
|
def PlayPause(self):
|
||||||
status=self._client.wrapped_call("status")
|
self._client.wrapped_call("toggle_play")
|
||||||
if status["state"] == "play":
|
|
||||||
self._client.wrapped_call("pause", 1)
|
|
||||||
else:
|
|
||||||
self._client.wrapped_call("play")
|
|
||||||
|
|
||||||
def Stop(self):
|
def Stop(self):
|
||||||
self._client.wrapped_call("stop")
|
self._client.wrapped_call("stop")
|
||||||
|
Loading…
Reference in New Issue
Block a user