Skip to content

Fix cloud artwork in media notifications - #84

Merged
lostf1sh merged 4 commits into
mainfrom
agent/fix-cloud-notification-artwork
Aug 9, 2026
Merged

Fix cloud artwork in media notifications#84
lostf1sh merged 4 commits into
mainfrom
agent/fix-cloud-notification-artwork

Conversation

@lostf1sh

@lostf1sh lostf1sh commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve Navidrome and Jellyfin custom artwork URIs in internal playback metadata
  • keep internal artwork available when the app resolves MediaSession queue items and restores snapshots
  • add regression coverage for both cloud artwork URI schemes
  • remove the obsolete one-off tools/migrate_presentation_strings.py migration helper

Root cause

Navidrome artwork is stored as navidrome_cover://…, but the internal artwork URI allowlist rejected that scheme. The custom URI therefore never reached MediaMetadata.artworkUri, so Media3 could not invoke the registered Coil bitmap loader for the playback notification. Tracks with embedded artwork could mask the issue because ExoPlayer supplied artwork data directly.

Impact

Navidrome and Jellyfin cover art can now be loaded for system media notifications during normal playback and after queue restoration, without exposing authenticated server URLs to external controllers.

Validation

  • ./gradlew testDebugUnitTest --tests com.lostf1sh.pixelplayeross.utils.MediaItemBuilderTest --tests com.lostf1sh.pixelplayeross.data.service.TrustedMediaItemsResolutionTest
  • ./gradlew assembleDebug
  • Full debug unit suite: 470 tests run; 12 unrelated existing failures remain in BackupManagerTest and MusicRepositoryImplTest.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@lostf1sh
lostf1sh marked this pull request as ready for review August 9, 2026 18:03
@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown

Greptile Summary

The PR preserves Navidrome and Jellyfin artwork through playback and queue restoration while safely exposing it to external media controllers.

  • Adds shareable content-provider URIs that load and transcode cloud artwork through Coil.
  • Preserves internal cloud artwork schemes when constructing playback metadata.
  • Maps restored and outgoing artwork to externally readable URIs and grants controller access.
  • Updates regression tests to JUnit Jupiter and removes an obsolete migration helper.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
app/src/main/java/com/lostf1sh/pixelplayeross/data/provider/SharedArtworkContentProvider.kt Adds validated cloud-artwork content URIs and serves fetched artwork through a read-only pipe.
app/src/main/java/com/lostf1sh/pixelplayeross/data/service/MusicService.kt Preserves the appropriate artwork representation across controller resolution, restoration, and URI permission grants.
app/src/main/java/com/lostf1sh/pixelplayeross/data/service/player/MappingPlayer.kt Generalizes outgoing artwork mapping to cover local and cloud internal URI schemes.
app/src/main/java/com/lostf1sh/pixelplayeross/utils/MediaItemBuilder.kt Adds cloud schemes to internal metadata and converts them to shareable provider URIs for external consumers.
app/src/test/java/com/lostf1sh/pixelplayeross/data/provider/SharedArtworkContentProviderTest.kt Covers Navidrome and Jellyfin URI round trips and rejection of unsupported remote artwork.
app/src/test/java/com/lostf1sh/pixelplayeross/utils/MediaItemBuilderTest.kt Adds cloud-scheme regression coverage using the repository-required JUnit Jupiter API.

Sequence Diagram

sequenceDiagram
    participant Snapshot as Queue snapshot
    participant Service as MusicService
    participant Mapper as MappingPlayer
    participant Controller as External controller
    participant Provider as Artwork provider
    participant Coil as Coil cloud fetcher
    Snapshot->>Service: Restore custom artwork URI
    Service->>Service: Convert to shared content URI
    Service->>Controller: Grant read permission
    Mapper->>Controller: Publish mapped media metadata
    Controller->>Provider: Open content URI
    Provider->>Coil: Load Navidrome/Jellyfin artwork
    Coil-->>Provider: Drawable
    Provider-->>Controller: JPEG through pipe
Loading

Reviews (4): Last reviewed commit: "Expose cloud artwork to media controller..." | Re-trigger Greptile

Comment thread app/src/main/java/com/lostf1sh/pixelplayeross/data/service/MusicService.kt Outdated
Comment thread app/src/main/java/com/lostf1sh/pixelplayeross/data/service/MusicService.kt Outdated
@lostf1sh
lostf1sh merged commit 17f3543 into main Aug 9, 2026
3 checks passed
@lostf1sh
lostf1sh deleted the agent/fix-cloud-notification-artwork branch August 9, 2026 18:34
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