aboutsummaryrefslogtreecommitdiffstats
path: root/volume-osd/Player.qml
diff options
context:
space:
mode:
Diffstat (limited to 'volume-osd/Player.qml')
-rw-r--r--volume-osd/Player.qml14
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.