Repository navigation
Conversation
loucass
force-pushed
the
fix/offline-first-media
branch
from
November 3, 2026 14:25
52b9120 to
d0e044e
Compare
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.
Offline-first lyrics, cover art, and canvas
Summary
Downloaded songs now behave offline-first: saved lyrics appear immediately, downloaded songs
keep their cover art on disk instead of relying on Coil's 24-hour cache, and their Apple Music
animated artwork or Spotify canvas is pinned alongside the download.
Lyrics
LyricsProvider.OFFLINE.returns.
lyrics database (
saveToDatabasegate).Cover art
ArtworkStore(common) with an Android implementation and a Desktop no-op.filesDir/artwork; filenames are{videoId}.jpgfori.ytimg.com/vi/...and{sha256(canonicalUrl)}.jpgotherwise (the=wNNN-hNNNsize segmentis stripped).
LocalArtworkInterceptor, registered beforeNetworkFirstInterceptor, so Coil resolves apinned file only when one exists.
PREPARING/DOWNLOADING; backfill existing downloads fromMainActivity.onStart.album art when another download still uses it.
Canvas and animated artwork
CanvasStore(common) with an Android implementation and a Desktop no-op.filesDir/canvas/<videoId>/:initialisation segment, and key it references, rewrite the playlist to relative local
filenames, and play the local playlist offline.
PREPARING/DOWNLOADING, and on the first successful onlinecanvas resolution for a song that is already downloaded. Existing downloads are not
backfilled in bulk: they get their canvas the next time they are played online or downloaded
again.
(Apple Music animated artwork or Spotify canvas) is still on.
foreground, and clear all of them with "Clear downloaded cache". "Clear canvas cache" leaves
pinned canvases alone.
canvas/folder.Testing
./gradlew :composeApp:jvmTest— addsArtworkFilesTest(4 tests) andCanvasPlaylistTest(6 tests: relative segments, shared byte-range files, AES keys, absoluteURLs, master rejection, CRLF preservation).
./gradlew :androidApp:assembleDebug:composeApp:jvmTest77 tests / 0 failures, arm64-v8a debug APK built.
Notes
NoOpArtworkStoreandNoOpCanvasStore.the store refuses a master rather than choosing one.
does not remove it.
Linked issue
Closes #2777
Closes #2602
Closes #2829
Checklist
Android: arm64-v8a debug APK built from this branch in CI (run 43650971641), JVM suite green.
Manual offline pass on the debug APK (lyrics, cover art, Apple Music animated artwork, Spotify
canvas, video mode, download removal, backup/restore) is still to be run.