From 4513a506fc575f880db80f05bb3a9cdf7dc100e0 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 21:14:47 +0200 Subject: narrow the sound module's real player list --- desktop/modules/sound/Player.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'desktop/modules/sound/Player.qml') diff --git a/desktop/modules/sound/Player.qml b/desktop/modules/sound/Player.qml index fab8083..e32a1b9 100644 --- a/desktop/modules/sound/Player.qml +++ b/desktop/modules/sound/Player.qml @@ -31,7 +31,15 @@ Singleton { readonly property var proxyNames: [".playerctld", ".plasma-browser-integration"] readonly property var real: - Mpris.players.values.filter(p => !root.proxyNames.some(n => p.dbusName.endsWith(n))) + Mpris.players.values.filter(p => !root.proxyNames.some(n => p.dbusName.endsWith(n)) + // A page can hold a silent MPRIS session that is + // not a track: WhatsApp Web sits paused forever with + // the tab title as `xesam:title` and nothing else. + // Paused with no artist and no length is that shape; + // a real paused track keeps its length (and usually + // its artist), so it survives. + && !(p.playbackState === MprisPlaybackState.Paused + && !p.lengthSupported && !p.trackArtist)) // Prefer something actually playing; otherwise keep the last one seen, so // pausing does not make the track row vanish mid-look. -- cgit v1.2.3