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
+4
View File
@@ -37,6 +37,10 @@ func (h *CoverArtHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
// Filenames are content-hashed (SHA-256), so they are immutable.
// Set aggressive cache headers to avoid redundant re-fetches.
w.Header().Set("Cache-Control", "public, max-age=31536000, immutable")
filePath := filepath.Join(h.coversDir, filename)
http.ServeFile(w, r, filePath)
}