Skip to content

Commit

Permalink
fix: do not send proprietiesChanged signal for position
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mokurin000 authored Jan 8, 2024
1 parent 2562455 commit 9f42d33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aionowplaying/interface/mpris2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 9f42d33

Please sign in to comment.