Cover art thumbnails

library scan creates thumbnails, cover grid component defaults to
thumbnail if available.
This commit is contained in:
2026-02-14 15:25:12 -05:00
parent 7579a768be
commit 38f3abbd3e
9 changed files with 213 additions and 17 deletions
@@ -278,9 +278,15 @@ export class CoverGrid extends LitElement {
${album.CoverArtPath
? html`<img
class="cover-image"
src="${album.CoverArtPath}"
src="${album.CoverArtThumbnailPath || album.CoverArtPath}"
alt="${album.Name} cover"
loading="lazy"
@error=${(e: Event) => {
const img = e.target as HTMLImageElement;
if (img.src !== album.CoverArtPath) {
img.src = album.CoverArtPath;
}
}}
/>`
: html`<div class="placeholder-cover">
${this.getAlbumInitial(album.Name)}