Bug 514788 - Media player widget quickly loses album art after turning on/switching track
Summary: Media player widget quickly loses album art after turning on/switching track
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Media Player widget (other bugs)
Version First Reported In: 6.5.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-18 11:45 UTC by uenatole
Modified: 2026-09-17 21:22 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.9.0 (may still be backported)
Sentry Crash Report:


Attachments
Demo (349.38 KB, video/mp4)
2026-01-18 11:45 UTC, uenatole
Details

Note You need to log in before you can comment on or make changes to this bug.
Description uenatole 2026-01-18 11:45:08 UTC
Created attachment 188641 [details]
Demo

SUMMARY

Media player loses album art after turning track on YouTube Music (shows ~1 second and then switches to stub).

STEPS TO REPRODUCE
1. Start track list on YouTube Music.
2. Open Media Player applet.
3. Switch to next track.

OBSERVED RESULT

Media player widget shows album art but but quickly switches to the stub.

EXPECTED RESULT

Media player shows album art.

SOFTWARE/OS VERSIONS
Operating System: Arch 
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Kernel Version: 6.18.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Akseli Lahtinen 2026-01-19 12:17:59 UTC
Can confirm this, but it only happens with Youtube music. Maybe problem with the plasma integration addon? 

What browser were you using? For me it happens with librewolf.

Operating System: KDE Linux 2026-01-18
KDE Plasma Version: 6.6.80
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.1
Kernel Version: 6.18.5-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15,5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 2 uenatole 2026-01-19 13:21:43 UTC
 (In reply to Akseli Lahtinen from comment #1)
> Can confirm this, but it only happens with Youtube music. Maybe problem with
> the plasma integration addon? 
> 
> What browser were you using? For me it happens with librewolf.
> 
> Operating System: KDE Linux 2026-01-18
> KDE Plasma Version: 6.6.80
> KDE Frameworks Version: 6.23.0
> Qt Version: 6.10.1
> Kernel Version: 6.18.5-zen1-1-zen (64-bit)
> Graphics Platform: Wayland
> Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
> Memory: 16 GiB of RAM (15,5 GiB usable)
> Graphics Processor: AMD Radeon RX 6600

I'm using Firefox. There are some observations of what happens when track is toggled:

> playerctl -F metadata
> plasma-browser-integration kde:pid                   1749
> plasma-browser-integration mpris:artUrl              file:///tmp/plasma-browser-integration_artwork_yvdmtk.jpg
> plasma-browser-integration mpris:length              248000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:album               Бодун
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               День победы
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=z40a0EOaN7s&list=RDEM0862eoObfg3DjHQ48x19Cg
> firefox mpris:trackid             '/org/mpris/MediaPlayer2/firefox'
> firefox xesam:title               День победы | YouTube Music
> firefox xesam:album               
> firefox xesam:artist              
> firefox xesam:url                 https://music.youtube.com/watch?v=z40a0EOaN7s&list=RDEM0862eoObfg3DjHQ48x19Cg
> firefox mpris:trackid             '/org/mpris/MediaPlayer2/firefox'
> firefox xesam:title               YouTube Music
> firefox xesam:album               
> firefox xesam:artist              
> firefox xesam:url                 https://music.youtube.com/watch?v=tmHbRNCwSa8&list=RDEM0862eoObfg3DjHQ48x19Cg
> plasma-browser-integration kde:pid                   1749
> plasma-browser-integration mpris:length              248000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               Дорога
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=z40a0EOaN7s&list=RDEM0862eoObfg3DjHQ48x19Cg
> firefox mpris:trackid             '/org/mpris/MediaPlayer2/firefox'
> firefox xesam:title               YouTube Music
> firefox xesam:album               
> firefox xesam:artist              
> firefox xesam:url                 https://music.youtube.com/watch?v=tmHbRNCwSa8&list=RDEM0862eoObfg3DjHQ48x19Cg
> firefox mpris:length              198000000
> plasma-browser-integration kde:pid                   1749
> plasma-browser-integration mpris:artUrl              file:///tmp/plasma-browser-integration_artwork_sUtibk.jpg
> plasma-browser-integration mpris:length              198000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               Дорога
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=tmHbRNCwSa8&list=RDEM0862eoObfg3DjHQ48x19Cg
> firefox mpris:trackid             '/org/mpris/MediaPlayer2/firefox'
> firefox xesam:title               Дорога | YouTube Music
> firefox xesam:album               
> firefox xesam:artist              
> firefox xesam:url                 https://music.youtube.com/watch?v=tmHbRNCwSa8&list=RDEM0862eoObfg3DjHQ48x19Cg
> firefox mpris:length              198000000
> plasma-browser-integration kde:pid                   1749
> plasma-browser-integration mpris:length              198000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:album               Птица
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               Дорога
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=tmHbRNCwSa8&list=RDEM0862eoObfg3DjHQ48x19Cg
```

As you can see, xesam:url remains the same, but mpris:artUrl disappears, and along with it the album art image on the widget is lost.

Looked at "firefox" entries in log I remembered one issue with media controls duplicate in KDE Connect (https://www.reddit.com/r/kde/comments/li9d64/tip_fix_firefox_duplicate_media_player_controls/) and decided to set `media.hardwaremediakeys.enabled` configuration option to 'False'. 

After this the situation changed a little:
> playerctl -F metadata
> plasma-browser-integration kde:pid                   263104
> plasma-browser-integration mpris:length              198000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:album               Птица
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               Дорога
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=tmHbRNCwSa8&list=RDEM0862eoObfg3DjHQ48x19Cg
> plasma-browser-integration kde:pid                   263104
> plasma-browser-integration mpris:length              198000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               День победы
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=tmHbRNCwSa8&list=RDEM0862eoObfg3DjHQ48x19Cg
> plasma-browser-integration kde:pid                   263104
> plasma-browser-integration mpris:artUrl              file:///tmp/plasma-browser-integration_artwork_EVqjvF.jpg
> plasma-browser-integration mpris:length              248000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               День победы
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=z40a0EOaN7s&list=RDEM0862eoObfg3DjHQ48x19Cg
> plasma-browser-integration kde:pid                   263104
> plasma-browser-integration mpris:length              248000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:album               Бодун
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               День победы
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=z40a0EOaN7s&list=RDEM0862eoObfg3DjHQ48x19Cg
> plasma-browser-integration kde:pid                   263104
> plasma-browser-integration mpris:artUrl              file:///tmp/plasma-browser-integration_artwork_arJmxK.jpg
> plasma-browser-integration mpris:length              248000000
> plasma-browser-integration mpris:trackid             '/org/kde/plasma/browser_integration/1337'
> plasma-browser-integration xesam:album               Бодун
> plasma-browser-integration xesam:artist              Аукцыон
> plasma-browser-integration xesam:title               День победы
> plasma-browser-integration xesam:url                 https://music.youtube.com/watch?v=z40a0EOaN7s&list=RDEM0862eoObfg3DjHQ48x19Cg

The action I done to recover mpris:artUrl and get album art visible again (permanently for this track) is pause/resume after toggle.

So perhaps the problem is a little more complex, and perhaps specific to certain applications.
Comment 3 ganalonrainier255 2026-05-24 12:15:12 UTC
Experiencing the same bug. artUrl seems to be fetched correctly on music videos though, so it may be something to do with the resolution/ratio. I've tried other web players (Spotify, Apple Music) and didn't experience this issue, so it seems exclusive to YouTube Music.

Web console doesn't emit anything relevant. I'm using Firefox (151.0.1) but I was also able to reproduce it on Helium (0.12.4).

Operating System: Fedora Linux 44
KDE Plasma Version: 6.6.5
KDE Frameworks Version: 6.26.0
Qt Version: 6.11.1
Kernel Version: 7.0.9-205.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 4 Takashi 2026-09-06 00:37:20 UTC
I investigated this issue and found what appears to be the cause in `extension-mpris.js`.

In the `mpris/metadata` callback, `fetchPlayerArtwork()` is called with `payload`, although the metadata object is stored in `payload.metadata`.

The current code is:

payload.pendingArtwork = fetchPlayerArtwork(payload, "", "", "");

I changed it to:

payload.pendingArtwork = fetchPlayerArtwork(payload.metadata, "", "", "");

I tested this change with Chrome and YouTube Music on Plasma 6.7.4.

Before the change, after switching tracks, the metadata (title, artist, album, etc.) was updated but `mpris:artUrl` was missing. Pausing and resuming playback caused the artwork to appear again.

After the change, `mpris:artUrl` is present immediately after switching tracks, without pausing or resuming playback.

So this change appears to fix the issue for me.

I have not tested this with other browser/media services yet, but I thought this might be useful information for investigating this bug.
Comment 5 Nate Graham 2026-09-08 23:10:46 UTC
Cool, would you like to submit a merge request with that change in it? Maintainers can tell you if it's acceptable, or how to revise it if it isn't.
Comment 6 Takashi 2026-09-09 15:12:28 UTC
(In reply to Nate Graham from comment #5)
> Cool, would you like to submit a merge request with that change in it?
> Maintainers can tell you if it's acceptable, or how to revise it if it isn't.

I really appreciate this opportunity, so I'd like to give it a try.
Comment 7 uenatole 2026-09-09 16:50:31 UTC
(In reply to Takashi from comment #6)
> (In reply to Nate Graham from comment #5)
> > Cool, would you like to submit a merge request with that change in it?
> > Maintainers can tell you if it's acceptable, or how to revise it if it isn't.
> 
> I really appreciate this opportunity, so I'd like to give it a try.

I'm looking forward to it)
Comment 8 Bug Janitor Service 2026-09-12 11:44:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-browser-integration/-/merge_requests/202
Comment 9 Kai Uwe Broulik 2026-09-16 12:31:27 UTC
Git commit b5f3bb0036ab67bd39a54a58cd1cfb79bd5032ba by Kai Uwe Broulik, on behalf of Takashi Kashiwagi.
Committed on 16/09/2026 at 12:31.
Pushed by broulik into branch 'master'.

Fix artwork fetching on metadata updates

The metadata callback stores the received metadata object in
payload.metadata. Pass that object to fetchPlayerArtwork() so it
can access the artwork property.

M  +1    -1    extension/extension-mpris.js

https://invent.kde.org/plasma/plasma-browser-integration/-/commit/b5f3bb0036ab67bd39a54a58cd1cfb79bd5032ba