Files
minstrel/android/app
bvandeusen 283706c4f8 feat(android): AlbumCard cover fallback for cached-only albums
The cached_albums → AlbumRef mapper drops coverUrl (only the
coverPath column is stored; the regular API's cover_url isn't
mirrored). Result: AlbumCards rendered from cache — Library Albums
tab, ArtistDetail album grid, Home Recently-added/Rediscover rows
on cold start — showed only the Lucide.Disc3 placeholder.

Same placeholder-URL trick as TrackRef.coverUrl:

  - models/AlbumRef.kt — adds `displayCoverUrl` computed property
    that returns the server-given coverUrl when populated, falls
    back to `http://placeholder.invalid/api/albums/{id}/cover`
    otherwise. BaseUrlInterceptor rewrites the host; Coil's shared
    OkHttp picks up the auth cookie. The original `coverUrl` field
    is preserved so callers that need to distinguish
    "server-provided" from "derived" can.

  - library/widgets/AlbumCard.kt — switches the branch from
    `album.coverUrl.isEmpty()` to `album.id.isEmpty()`. The cover
    Box gets a surfaceVariant background so failed image loads
    (e.g. album server-side without art) degrade to a tinted
    square rather than transparent. A proper error-slot fallback
    icon is a future refinement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 08:17:08 -04:00
..