Add offline cloud playback and MusicBrainz enrichment - #85
Open
lostf1sh wants to merge 3 commits into
Open
Conversation
lostf1sh
marked this pull request as ready for review
August 9, 2026 20:34
|
| Filename | Overview |
|---|---|
| app/src/main/java/com/lostf1sh/pixelplayeross/data/offline/CloudOfflineRepository.kt | Coordinates attempt-scoped download enqueue, retry, removal, observation, and local URI resolution; the previously reported cancellation race is addressed with guarded attempt ownership. |
| app/src/main/java/com/lostf1sh/pixelplayeross/data/worker/CloudTrackDownloadWorker.kt | Downloads validated cloud streams into attempt-scoped temporary files and conditionally publishes completed state. |
| app/src/main/java/com/lostf1sh/pixelplayeross/presentation/viewmodel/SongInfoBottomSheetViewModel.kt | Adds MusicBrainz search and apply workflows, with the previously hardcoded fallback messages now resolved from Android string resources. |
| app/src/main/java/com/lostf1sh/pixelplayeross/data/musicbrainz/MusicBrainzRepository.kt | Implements serialized MusicBrainz lookup, ranking, and conservative application of selected metadata. |
| app/src/main/java/com/lostf1sh/pixelplayeross/data/service/MusicService.kt | Replaces media-library browsing behavior with standard MediaSession service integration while preserving playback controls. |
| app/src/main/java/com/lostf1sh/pixelplayeross/data/database/Migrations.kt | Adds the v4-to-v5 database migration supporting attempt-scoped offline download state. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Cloud[Navidrome / Jellyfin] --> Worker[WorkManager download]
Worker --> PrivateStorage[App-private offline file]
PrivateStorage --> Playback[MediaSession playback]
Track[Track metadata] --> MB[MusicBrainz search]
MB --> Review[User selects match]
Review --> Database[Persist MBIDs and missing metadata]
Reviews (3): Last reviewed commit: "Add cloud download management UI" | 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.
Why
Cloud libraries currently stop being useful as soon as the device loses its connection, and MusicBrainz identifiers can only come from metadata that was already present in a file. This PR makes self-hosted libraries more dependable on the go and gives people an explicit, reviewable way to enrich sparse metadata.
It also removes the Android Auto browsing surface, which is no longer part of the app's intended scope, while keeping ordinary notification, lock-screen, Bluetooth, and system media controls working.
What changed
MediaLibraryServicewithMediaSessionService.Validation
./gradlew :app:assembleDebuggit diff --checkThe targeted checks pass and the debug APK builds successfully. The project-wide lint task still reports existing errors in unrelated code (including
LibraryScreenlocale observation and Media3 opt-in warnings inFadingPlayer). The full unit suite also has 12 existing failures inMusicRepositoryImplTestandBackupManagerTest; the tests covering this PR pass.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.