aboutsummaryrefslogtreecommitdiffstats
path: root/volume-osd
diff options
context:
space:
mode:
Diffstat (limited to 'volume-osd')
-rw-r--r--volume-osd/Player.qml14
-rw-r--r--volume-osd/README.md19
2 files changed, 22 insertions, 11 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.
diff --git a/volume-osd/README.md b/volume-osd/README.md
index 950edca..83a9495 100644
--- a/volume-osd/README.md
+++ b/volume-osd/README.md
@@ -35,19 +35,24 @@ there was anything clickable on it. It still takes no keyboard focus.
Two things about MPRIS that are not obvious:
-**playerctld publishes a duplicate.** It proxies whichever player is active
-and republishes the metadata under `org.mpris.MediaPlayer2.playerctld`, so
-every player appears twice. `Player.qml` drops that name and talks to the real
-player, which works whether or not playerctld is running.
+**Proxies publish duplicates.** playerctld proxies whichever player is
+active and republishes it under `org.mpris.MediaPlayer2.playerctld`. With a
+browser, plasma-browser-integration does the same, so one Navidrome tab was
+live on three bus names at once. `Player.qml` drops both proxies and talks to
+the browser's own entry. None of the three exists until playback starts, and
+an open but silent tab publishes nothing at all.
**Album art can be a reused temp path.** Audacious extracts embedded art to a
file in its cache and rewrites that same path on each track, so the URL repeats
while the image behind it changes. The source carries the track title as a
cache buster and `cache: false`, or the previous track's cover stays on screen.
-Verified against audacious and Firefox. Firefox is the interesting one: a tab
-per stream, all under one bus name, which is where the playerctld filter above
-would show up if it were wrong. Signal is untested.
+Verified against audacious and Firefox playing Navidrome. Browsers do not
+fill in everything: Navidrome sets no `mpris:artUrl`, so there is no cover to
+show and the row renders without one, and it packs everything into
+`xesam:title` ("Roxanne - The Police - Navidrome") leaving `xesam:artist`
+empty. Neither is worked around, a title like that cannot be split back apart
+without guessing where a real dash ends. Signal is untested.
## No keybinds to change