mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
Second block of #65. - ArtworkStore keeps the album's and the artist's cover art, thumbnail and full, in downloads/<sourceId>/art, keyed by the cache key the rest of the app already uses for Coil and for palettes. Keys are base64url encoded because cover art ids come from the server and must not reach outside the art directory. - Downloading a song fetches that artwork first, in our process and while the app is in the foreground, under a timeout, and hands the media to the platform afterwards whether or not the artwork arrived. A song whose album or artist has no art, or whose art fetch fails, still downloads. - SourceRepository.coverArt resolves a stored file before the server, at the one point every CoverArt, the notification bitmap loader and the palette prefetch go through, so downloaded artwork works without the network. - The sweep prunes art that no download references, so removing the last download of an album drops its art while art another download still needs stays.