android: the catalog's numbers — Popular's own lane, a count per row, the artist's photo

Popular is asked on its own as well as with the page, so the section can
paint before the full page is built and an artist whose page came back
with none still gets one. A catalog record's rows that the album's own
artist anchor found no count for — a feature's guest, a compilation's
stranger — get the deferred Last.fm pass by their own artist id. The
artist page's ⋯ is its own sheet now: choose a hero photo from this phone,
or put the catalog's own back; set_artist_hero is pick_artist_hero's
install step split out and shared, so the desktop's dialog keeps its door.
You gains the desktop's Refresh artist portraits, and a data: URL is the
image itself in the art gate — a chosen hero comes back from Rust as one,
and the thumbnail fetch used to throw it away.
This commit is contained in:
KeelrLeek committed 2026-09-13 23:46:07 -05:00
1 parent c737809325
commit 1737c5e1b6
12 files changed
+232 -13

No files matched your search

+13
View File
@@ -106,6 +106,7 @@
const artMode = $derived(cfg?.replace_embedded_art === false ? "keep" : "replace");
const artEdge = $derived(String(cfg?.embed_art_max_edge ?? 1500));
let refetching = $state(false);
let refreshingArtists = $state(false);
async function saveCfg(patch) {
try { await api.setSettings(patch); cfg = await api.getSettings(); } catch (e) { player.error = String(e); }
}
@@ -136,6 +137,14 @@
catch (e) { player.error = String(e); }
finally { refetching = false; }
}
/* the desktop Settings row: a portrait for every artist already here */
async function refreshPortraits() {
if (refreshingArtists) return;
refreshingArtists = true;
try { const n = await api.refreshArtistArt(); note(`${n ?? 0} portrait${n === 1 ? "" : "s"} refreshed`); }
catch (e) { player.error = String(e); }
finally { refreshingArtists = false; }
}
const ROWS = [
["ambience", "image", "Ambience", "the artwork in play, blurred, under every screen"],
["accent", "sparkle", "Accent from artwork", "the app takes the record's colour"],
@@ -309,6 +318,10 @@
<span class="lead"><Icon name="refresh" size={20} /></span>
<span class="b"><span class="t">{refetching ? "Upgrading covers…" : "Re-fetch all album covers"}</span><span class="m">every record to the canonical high-resolution cover — about one a second</span></span>
</button>
<button class="row" onclick={refreshPortraits} disabled={refreshingArtists}>
<span class="lead"><Icon name="users" size={20} /></span>
<span class="b"><span class="t">{refreshingArtists ? "Refreshing portraits…" : "Refresh artist portraits"}</span><span class="m">a photo for every artist already in your library</span></span>
</button>
</div>
<div class="sheet-sec">This phone</div>