Fix cloud artwork in media notifications - #84
Merged
Conversation
lostf1sh
marked this pull request as ready for review
August 9, 2026 18:03
|
| 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
Reviews (4): Last reviewed commit: "Expose cloud artwork to media controller..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/migrate_presentation_strings.pymigration helperRoot cause
Navidrome artwork is stored as
navidrome_cover://…, but the internal artwork URI allowlist rejected that scheme. The custom URI therefore never reachedMediaMetadata.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 assembleDebugBackupManagerTestandMusicRepositoryImplTest.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.