Media widget shows Brave logo instead of cover art on first track of a Brave PWA (YouTube Music)

Open Beginner friendly
#4,412 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
linux
Domain
desktop

Research direction

The placeholder check lives in Services/TrackArtService.qml, where _artHashDenylist holds the SHA1 of Chrome's logo. Start there and confirm how the artUrl file is hashed before it is accepted. Add Brave's placeholder hash to the list, or match on the MPRIS identity "Brave" as the issue suggests. Done when the first track of a Brave PWA shows the real cover instead of the logo.

Written by the indexing model from the issue text.

Description

bug
Description

When I start YouTube Music as an installed Brave web app (PWA), the DankBar media widget
shows the Brave logo as cover art for the first track. As soon as the next track starts,
the correct album cover is displayed and everything works as expected.

It looks like Brave publishes its own logo as a placeholder mpris:artUrl before the real
cover arrives, similar to the Chrome placeholder that is already handled in
Services/TrackArtService.qml:

// sha1s of placeholder art to reject (Chrome's own logo, shown before real cover).
readonly property var _artHashDenylist: ["764a730860c5b8a7bbee690ee5a443672ae37dc8"]

The Brave logo is not on this denylist, so it seems to get committed and stays until the
track changes.

Steps to reproduce
  1. Install YouTube Music as a Brave web app.
  2. Start it: brave --profile-directory=Default --app-id=<app-id>
  3. Play a track. The bar media widget shows the Brave logo.
  4. Skip to the next track. The real cover appears.
Expected behavior

The Brave placeholder logo should be rejected like the Chrome one, and the real cover should
be shown for the first track as well.

Possible fix

Add the SHA1 of Brave's placeholder image to _artHashDenylist (or detect browser
placeholder art in a more generic way, e.g. by MPRIS identity "Brave").

Environment
  • DMS: v2.1.2 (API v40)
  • Hyprland: 0.57.2
  • Brave: 158.1.100.59
  • OS: CachyOS (Linux 7.3.5)
  • MPRIS player: org.mpris.MediaPlayer2.brave.instance*, identity "Brave",
    artUrl is a file:///tmp/.org.chromium.Chromium.* file
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.