fix(locallibrary): show offline/folder album covers + add source badge
Two fixes from the first Albums-grid test pass. Offline/folder covers (the reported "cover exists in the folder but isn't shown"): some albums — offline-cached CMAF bundles and folder downloads — have no artwork_path in the index even though a cover.jpg sits in the track folder (older offline-cache downloads didn't backfill it). Add a frontend- agnostic LibraryDatabase::resolve_album_cover_fallback(group_key) that finds a representative track, derives its folder (the path itself for a CMAF bundle dir, else the parent), and returns <folder>/cover.jpg when it exists. The Slint Albums mapper calls it whenever the album has no artwork. Verified against the live index: it resolves the folder covers that exist on disk (FLAC-layout + CMAF-with-cover). Older CMAF bundles that never downloaded a cover (segments only) still show the placeholder — those need a cover re-fetch (offline-cache maintenance), tracked separately. Source badge: the Local Library album card now shows the always-visible source badge inside the artwork (bottom-right) — a hard-drive glyph for local files, the Qobuz logo for offline copies, the Plex logo for Plex. Added AlbumCard.show-source-badge (default off; threaded through AlbumCollectionView /AlbumGrid) + AlbumCard.source; album_map now carries the real source and map_local_album maps user->local / qobuz_download / plex. Small rounded square, not a pill (ADR-008). Logos copied into the Slint icon assets. Built green (cargo check -p qbz-slint); runtime smoke-test pending. cc
This commit is contained in:
8 files changed
+834
-8
No files matched your search
@@ -364,6 +364,8 @@ export component LocalLibraryView inherits Rectangle {
|
||||
show-source: false;
|
||||
// Local albums aren't Qobuz-favoritable — hide the heart.
|
||||
show-favorite: false;
|
||||
// Always-visible source badge (local | qobuz-offline | plex).
|
||||
show-source-badge: true;
|
||||
open-album(id) => {
|
||||
LocalLibraryActions.open-album(id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user