fix(mpris): match fully qualified D-Bus signal names in the watcher - #46
Merged
bethropolis merged 1 commit intoSep 27, 2026
Merged
Conversation
godbus reports Signal.Name as "interface.member" (e.g. "org.freedesktop.DBus.Properties.PropertiesChanged"), but the watcher switch compared against bare member names, so no case ever matched and the PropertiesChanged, Seeked and NameOwnerChanged handlers never ran. AI-assisted.
Owner
|
Thank you for catching this, I think with this i can finally remove the watchdog. |
Contributor
Author
|
yeah the watchdog isn't needed now, also @bethropolis i found this bcz someone made a vicinae extension (vicinaehq/extensions#398 its not merged as of now) for it, which is really cool. maybe you could mention it in the readme or somewhere, so people can get a useful implementation of this project Any way really cool project, thanks for your work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
godbus sets
Signal.Nametointerface.member— documented on theSignaltype in v5.2.2(
conn.go: "The name member is given in 'interface.member' notation") and built asName: iface + "." + member. The D-Bus spec makes the INTERFACE header required for signals, sothe name is always qualified.
The switch in
internal/plugins/mpris/watcher.gocompared it against bare member names:None of these can match, so
handleNameOwnerChanged,handleSeekedandhandlePropertiesChangednever ran. This PR uses the qualified names:org.freedesktop.DBus.NameOwnerChangedorg.mpris.MediaPlayer2.Player.Seekedorg.freedesktop.DBus.Properties.PropertiesChangedWhy it appeared to mostly work
The plugin's fallback paths covered for the dead signal path:
position_interval(2 s), so pauses and track changes arrived up to 2 s late.
watchdogInterval, 10 s) finds playback thatstarted, so play-from-pause took up to ~10 s.
phone requests the player list, since
NameOwnerChangedwas never handled.With this change, updates are signal-driven again and the poller and watchdog go back to being
backups.
Testing
qualified names above for NameOwnerChanged, Seeked and PropertiesChanged.
go test ./...(with and without-race), the integration suite,go vetandgofmtall pass.AI-assisted.