aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/sound
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/sound')
-rw-r--r--desktop/modules/sound/Player.qml10
1 files changed, 9 insertions, 1 deletions
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.