Bar media widget shows grey placeholder instead of cover art when consecutive tracks share the same art URL

Open
#4,418 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
desktop

Research direction

Start in quickshell/Services/TrackArtService.qml: read _loadCurrentArtwork, then the first branch of _commit, which returns without _publish when the source URL is unchanged, and artReadyFor, which compares the track key. Quickshell/Modules/DBar/Widgets/Media.qml shows where coverArtUrl comes from. Done when consecutive tracks sharing an art URL keep showing cover art, and the stale-browser-cover case the early return guards against still gets replaced.

Written by the indexing model from the issue text.

Description

bug
Compositor

Hyprland

Distribution

NixOS

If Other, please specify

No response

Select your Installation Method

Distro Packaging

Was this your original Installation method?

Yes

If no, specify

No response

dms doctor -vC
Click to expand
System
  ● Operating System ····· NixOS 26.11 (Zokor)
  ● Architecture ········· amd64
  ● Display Server ······· Wayland

Versions
  ● DMS CLI ·············· dms 2.2-beta+date=2026-11-25_98a936d
  ● Quickshell ··········· Quickshell 0.4.73 (revision 1f768a313e9813e505e17d9436403fdcbce02c64, distributed by Nix)
  ● DMS Shell ············ 2.2-beta+date=2026-11-25_98a936d

Installation
  ○ Install Type ········· Nix store (flake)

Compositor
  ● Hyprland ············· 0.57.2

Optional Features
  ● cava ················· Installed
Description

With cover art and the visualizer enabled on the bar media widget, the cover slot turns into the empty grey placeholder when Spotify moves to a track whose mpris:artUrl is the same as the previous track's, which is the normal case when playing an album. The art stays grey until a track with a different art URL plays, or until the player goes away (restarting Spotify or the shell).

The metadata is fine while this happens: Spotify publishes mpris:trackid, xesam:title, and an https://i.scdn.co/image/... mpris:artUrl, and the downloaded ~/.cache/dms/imagecache/remote_<hash> file is a valid 640×640 JPEG.

Cause

TrackArtService never commits the new track's key when the art source URL is unchanged:

  1. On the track change, _loadCurrentArtwork sees url === _committedSrcUrl && key !== _committedArtKey, sets loading = true, and starts reusedSourceDelay.
  2. When the delay fires, loadArtwork finds the cached file and calls _commit(localFileUrl, newKey, sameSrcUrl).
  3. The first branch of _commit matches (same resolved URL, same source URL, different key), sets loading = false, and returns without calling _publish, so artwork.key keeps the previous track's key.
  4. artReadyFor now fails because _trackKey(player) !== _committedArtKey, so the bar's coverArtUrl is empty and the slot is drawn with Theme.chipSurfaceNested.
  5. Later metadata signals for the same track re-enter step 1, but loadArtwork returns early on url === _lastArtUrl && requestSerial === _lastIssuedSerial, so nothing retries.

reusedSourceDelay already waits for a stale browser cover to be replaced, so the early return in _commit seems to reject legitimate shared album art after that wait has passed. Publishing the existing art under the new key in that branch (something like _publish(candidate, artwork.colors)) looks like the fix, though I haven't tested it against the Chrome case the branch may be guarding.

Expected Behavior

Consecutive tracks that share cover art keep showing it.

Steps to Reproduce
  1. Enable cover art and the visualizer on the bar media widget.
  2. Play an album in Spotify, so consecutive tracks share the same mpris:artUrl.
  3. Let it advance to the next track, or skip to it.
  4. The cover slot turns grey and stays grey for every following track on the album.
Error Messages/Logs

Nothing relevant in the dms journal.

Screenshots/Recordings

No response

Dominant language
QML
Stars
8.4k
Forks
549
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AvengeMedia/DankMaterialShell

All issues in AvengeMedia/DankMaterialShell

Similar issues

More Desktop Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.