From 9f42d33a9f0600be05c785ce44b79b65d7370d6c Mon Sep 17 00:00:00 2001 From: poly000 <34085039+poly000@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:08:21 +0800 Subject: [PATCH] fix: do not send proprietiesChanged signal for position The org.freedesktop.DBus.Properties.PropertiesChanged signal is not emitted when this property changes. https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html#Property:Position --- aionowplaying/interface/mpris2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aionowplaying/interface/mpris2.py b/aionowplaying/interface/mpris2.py index 4072d3e..8025430 100644 --- a/aionowplaying/interface/mpris2.py +++ b/aionowplaying/interface/mpris2.py @@ -37,6 +37,8 @@ def __init__(self, bus_name: str, it: 'Mpris2Interface' = None): def set_property(self, name: str, value: Any): setattr(self._properties, name, value) + if name == PlaybackPropertyName.Position: + return if isinstance(value, PlaybackProperties.MetadataBean): value = DBusBeanMapper.metadata(value) self.emit_properties_changed({name: value})