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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user