diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-12 11:27:20 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-12 11:27:20 +0200 |
| commit | ccbe67dea24629e9b5a268da05cc31424c2e80e2 (patch) | |
| tree | cd312d7ae84c0daf782a315455e590be0d0f97a2 /volume-osd/Player.qml | |
| parent | d11c4c9f0fdc3cd9d57550ef37100b762f1de3b1 (diff) | |
| download | quickshell-ccbe67dea24629e9b5a268da05cc31424c2e80e2.tar.gz quickshell-ccbe67dea24629e9b5a268da05cc31424c2e80e2.zip | |
fix(volume-osd): drop the plasma-browser-integration duplicate too
playerctld was not the only proxy. plasma-browser-integration republishes a
browser tab under its own bus name, so a playing Navidrome tab in Firefox
was live on three names at once: firefox.instance_*, the plasma name, and
playerctld. Only the first was being filtered, so two entries survived for
one track and the transport buttons went to whichever sorted first.
Safe to drop because none of the three bus names exists until playback
starts, and the browser's own entry was present whenever the plasma one
was, measured across two play sessions. An open but silent tab publishes
nothing, so there is no row to lose.
Also records what Navidrome does not provide: no mpris:artUrl, which is why
the row shows no cover and is not a bug on this side, and everything packed
into xesam:title with xesam:artist left empty. Neither is worked around,
splitting such a title needs guessing where a real dash ends.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvHeJEXJzdfAaCCYqURAWp
Diffstat (limited to 'volume-osd/Player.qml')
| -rw-r--r-- | volume-osd/Player.qml | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/volume-osd/Player.qml b/volume-osd/Player.qml index 73f86af..7c17c0a 100644 --- a/volume-osd/Player.qml +++ b/volume-osd/Player.qml @@ -19,11 +19,17 @@ import QtQuick Singleton { id: root - // playerctld proxies whatever is playing and publishes it under its own - // name, so every real player shows up twice. Its own entry is skipped: - // controlling the player directly works whether or not playerctld is up. + // Two things proxy a real player and republish it under their own name, so + // one track can appear on three buses at once: a playing Navidrome tab + // showed up as firefox.instance_*, as plasma-browser-integration and as + // playerctld. Both proxies are skipped and the OSD talks to the browser's + // own entry, which is safe because none of the three exists until playback + // starts, and the browser's entry appeared whenever the plasma one did. An + // open but silent tab publishes nothing, so there is no row to lose. + readonly property var proxyNames: [".playerctld", ".plasma-browser-integration"] + readonly property var real: - Mpris.players.values.filter(p => !p.dbusName.endsWith(".playerctld")) + Mpris.players.values.filter(p => !root.proxyNames.some(n => p.dbusName.endsWith(n))) // Prefer something actually playing; otherwise keep the last one seen, so // pausing does not make the track row vanish mid-look. |
