1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

fix(player): combine trackid with text identity (#2808)

fixes #2807

(cherry picked from commit c445597f83)
This commit is contained in:
Kangheng Liu
2026-07-10 13:37:16 -04:00
committed by purian23
parent 375afaaf3a
commit 36772735f3
+6 -4
View File
@@ -184,11 +184,13 @@ Singleton {
const p = activePlayer;
if (!p)
return "";
// Prefer the stable track id; title/artist/album fill in progressively (Chrome).
// Combine trackid with the text identity. trackid alone dedups Chrome's multi-size art
// re-publish, but some players (e.g. KDEconnect) expose a constant trackid across every
// track, so keying on it alone wedged the dedup and new-song art never loaded. Folding
// in title/artist/album busts the lock on a real track change while same-track art
// churn (stable text) stays deduped.
const tid = p.metadata && p.metadata["mpris:trackid"] ? p.metadata["mpris:trackid"].toString() : "";
if (tid !== "")
return tid;
return (p.trackTitle || "") + "" + (p.trackArtist || "") + "" + (p.trackAlbum || "");
return tid + " " + (p.trackTitle || "") + " " + (p.trackArtist || "") + " " + (p.trackAlbum || "");
}
function artReadyFor(player) {