mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
fixed wrong mpris metadata
This commit is contained in:
parent
a35b67865a
commit
a735c650e5
@ -218,6 +218,7 @@ class MPRISInterface: # TODO emit Seeked if needed
|
||||
self._client.emitter.connect("random", self._on_random_changed)
|
||||
self._client.emitter.connect("connection_error", self._on_connection_error)
|
||||
self._client.emitter.connect("reconnected", self._on_reconnected)
|
||||
self._client.emitter.connect("disconnected", self._on_disconnected)
|
||||
|
||||
def _handle_method_call(self, connection, sender, object_path, interface_name, method_name, parameters, invocation):
|
||||
args=list(parameters.unpack())
|
||||
@ -462,6 +463,10 @@ class MPRISInterface: # TODO emit Seeked if needed
|
||||
for p in properties:
|
||||
self._update_property(self._MPRIS_PLAYER_IFACE, p)
|
||||
|
||||
def _on_disconnected(self, *args):
|
||||
self._metadata={}
|
||||
self._update_property(self._MPRIS_PLAYER_IFACE, "Metadata")
|
||||
|
||||
def _on_connection_error(self, *args):
|
||||
self._metadata={}
|
||||
properties=("PlaybackStatus","CanGoNext","CanGoPrevious","Metadata","Volume","LoopStatus","Shuffle","CanPlay","CanPause","CanSeek")
|
||||
|
Loading…
Reference in New Issue
Block a user