library: the page lit by its own records, and portraits that prove out

The expander reserves once on the page root instead of standing min-heights
on the grid; shelf heads carry artist portraits keyed by path; every record
tints its own card, expander and glow from its cover; the artwork opens the
shared viewer; the banner wash reads the playing record and actually paints
(isolation, the artist page's own fix); descriptions animate on both pages
via partAnim. Portrait resolution rejects placeholder rows and never stores
a silhouette (pick_artist_portrait, 3 tests); repair re-resolves the missing.
This commit is contained in:
KeelrLeek committed 2026-08-06 17:21:23 -05:00
1 parent 741c4ae6dc
commit 185c29fc33
5 files changed
+1068 -49

No files matched your search

+15
View File
@@ -288,6 +288,21 @@ impl Library {
Ok(())
}
/// One row per distinct album artist, with whatever portrait path is
/// stored against it. The caller decides what counts as missing — the
/// library has no view of the filesystem, and a path that is present in the
/// database but gone from disk is exactly the case worth repairing.
pub fn artist_portraits(&self) -> Result<Vec<(String, Option<String>)>> {
let conn = self.conn.lock().unwrap();
let mut stmt = conn.prepare(
"SELECT artist, MAX(artist_art_path) FROM albums GROUP BY artist COLLATE NOCASE",
)?;
let rows = stmt
.query_map([], |r| Ok((r.get(0)?, r.get(1)?)))?
.collect::<std::result::Result<Vec<_>, _>>()?;
Ok(rows)
}
pub fn set_artist_art(&self, artist: &str, art_path: &str) -> Result<usize> {
let conn = self.conn.lock().unwrap();
Ok(conn.execute(