Skip to content

fix: show album art on Chromecast by sending a fetchable cover-art URL#852

Open
herrerad85 wants to merge 1 commit into
eddyizm:developmentfrom
herrerad85:fix/cast-album-art-115
Open

fix: show album art on Chromecast by sending a fetchable cover-art URL#852
herrerad85 wants to merge 1 commit into
eddyizm:developmentfrom
herrerad85:fix/cast-album-art-115

Conversation

@herrerad85

Copy link
Copy Markdown
Contributor

Fixes #115.

Problem

Media items carry their artwork as a content:// URI served in-process by AlbumArtContentProvider. That works for the local player, but a Chromecast receiver is a separate device and can't open another app's content:// URI, so no album art shows while casting. The local now-playing screen is fine because it reads the same URI in-process. The reporter confirmed it as a Chromecast issue.

Fix

CastPlayer was built with the default MediaItemConverter, which forwards the content:// URI to the receiver unchanged. This wraps it in a CastMediaItemConverter that rewrites content:// artwork to the server cover-art URL via CustomGlideRequest.createUrl(), which already builds a fully authenticated getCoverArt URL the receiver can fetch on its own. Radio covers (rl_/ir_) are left untouched.

Testing

  • New instrumented test CastArtworkConverterTest: the default converter emits a content:// image, and CastMediaItemConverter emits the getCoverArt URL.
  • Confirmed on a real Chromecast: album art now shows while casting.
  • Builds green: :app:assembleTempusDebug on JDK 21.

Media items carry their artwork as a content:// URI served in process by
AlbumArtContentProvider. That is fine for the local player but useless to a
Chromecast: the receiver is a separate device and cannot open another app's
content:// URI, so no album art shows while casting (the local now-playing
screen is unaffected because it reads the same URI in process).

CastPlayer was built with the default MediaItemConverter, which forwards the
content:// URI to the receiver unchanged. Wrap it in a CastMediaItemConverter
that rewrites a content:// artwork to the server cover-art URL via
CustomGlideRequest.createUrl(), which already builds a fully authenticated
getCoverArt URL the receiver can fetch on its own. Radio covers (rl_/ir_) are
left untouched.

Verified at the converter level with a new instrumented test
(CastArtworkConverterTest): the default converter emits a content:// image,
and CastMediaItemConverter emits the getCoverArt URL. Also confirmed on a
real Chromecast: album art now shows while casting.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 24addf64-5f4b-4377-b22c-4ead7b45a286

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant