fix: seed artist image cache from library data in search results

In library-only mode, loadArtistImages() is skipped (it calls
GetArtistImageURL which hits MB/Wikidata). But searchLibraryCache
already attaches _imageSmall/_imageMedium from the library store.
Now these are seeded into artistImageCache immediately after
setting results, so the search renderer finds them.
This commit is contained in:
2026-03-30 16:13:30 -04:00
parent 1103d6f818
commit 0f432dc7ba
@@ -597,6 +597,15 @@ export class ExploreView extends LitElement {
localResults.artists || [],
localResults.releaseGroups || [],
);
// Seed artist image cache from library data.
for (const a of localResults.artists || []) {
const img = (a as any)._imageMedium || (a as any)._imageSmall;
if (img && a.mbid) {
this.artistImageCache.set(a.mbid, img);
}
}
// In library-only mode, local results already have cover art
// and artist images from the library store — no API calls needed.
if (!exploreSettings.libraryOnly) {