diff --git a/frontend/src/components/artists-view/artists-view.ts b/frontend/src/components/artists-view/artists-view.ts index cacbb92..d3946a4 100644 --- a/frontend/src/components/artists-view/artists-view.ts +++ b/frontend/src/components/artists-view/artists-view.ts @@ -18,6 +18,7 @@ import { } from '@go/library/Library'; import { library } from '@go/models'; import { LibraryController } from '@store/controllers/library-controller'; +import { libraryStore } from '@store/library-store'; import { SearchController } from '@store/controllers/search-controller'; import { queueStore } from '@store/queue-store'; import { @@ -995,6 +996,26 @@ export class ArtistsView imageURL = artist.ImageLarge || ''; } + // Fallback: use album cover art if no artist image. + if (!imageURL) { + const cachedAlbums = libraryStore.cachedAlbums; + if (cachedAlbums) { + const name = artist.Name.toLowerCase(); + + for (const a of cachedAlbums) { + if (a.ArtistName.toLowerCase() === name) { + if (needed <= 100) { + imageURL = a.CoverArtSmall || a.CoverArtMedium || ''; + } else { + imageURL = a.CoverArtMedium || a.CoverArtLarge || ''; + } + + if (imageURL) break; + } + } + } + } + if (imageURL) { return html`