navidrome/core/artwork
Deluan af984bc817 feat(artwork): advertise album art for tracks whose embedded cover is the album's
Most albums embed the same picture in every track, so clients requesting
per-track cover art (mf- ids) download and cache the same image once per
song. This change hashes the embedded picture at scan time (XXH3 of the
bytes, the same digest the artwork pipeline uses) and stores it on
media_file.embed_art_hash. ToAlbum stores the hash of the track it already
picks as the album's embedded cover (EmbedArtPath) on album.embed_art_hash.

A new MediaFile.HasOwnCoverArt replaces the scattered
"HasCoverArt && EnableMediaFileCoverArt" checks: a track whose hash equals
its album's now returns the disc/album artwork id from CoverArtID, so the
Subsonic, Jellyfin and native responses point every matching song at one
cached image. Serving a stale mf- URL follows the same rule, so what is
advertised and what is served agree. Tracks with a different embedded
picture (compilations, per-track art) keep their own ids.

Rows scanned before this change have an empty hash and keep the previous
behavior until a full scan; no config option is added. The album hash is
hydrated onto tracks with one batched PK lookup per page, only when the
page has hashed tracks. BestImageIndex is exported from core/artwork so the
scanner hashes the same picture the resolver serves.
2026-09-07 00:35:21 -04:00
..
blurhash perf(artwork): compute the blurhash DCT separably (#5989) 2026-08-19 16:20:38 -04:00
dominant feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
e2e test: increase timeout for cache availability checks to 10 seconds 2026-08-19 10:35:15 -04:00
thumbhash feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
agent_images.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
agent_images_test.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
animation.go feat(artwork): preserve animated image artwork during resize (#5184) 2026-03-13 18:11:12 -04:00
animation_test.go feat(artwork): preserve animated image artwork during resize (#5184) 2026-03-13 18:11:12 -04:00
artwork.go feat(artwork): advertise album art for tracks whose embedded cover is the album's 2026-09-07 00:35:21 -04:00
artwork_suite_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
artwork_test.go feat(artwork): advertise album art for tracks whose embedded cover is the album's 2026-09-07 00:35:21 -04:00
benchmark_decode_test.go perf(artwork): improve image serving performance with WebP encoding and optimized pipeline (#5181) 2026-03-13 09:35:59 -04:00
benchmark_encode_test.go perf(artwork): improve image serving performance with WebP encoding and optimized pipeline (#5181) 2026-03-13 09:35:59 -04:00
benchmark_helpers_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
benchmark_pipeline_test.go feat(artwork): preserve animated image artwork during resize (#5184) 2026-03-13 18:11:12 -04:00
benchmark_tag_test.go perf(artwork): improve image serving performance with WebP encoding and optimized pipeline (#5181) 2026-03-13 09:35:59 -04:00
disc.go feat(cli): add an artwork command group for diagnosing and re-driving artwork (#5957) 2026-08-14 21:07:56 -04:00
disc_test.go feat(cli): add an artwork command group for diagnosing and re-driving artwork (#5957) 2026-08-14 21:07:56 -04:00
folders_album.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
folders_album_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
folders_artist.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
folders_artist_paths_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
folders_artist_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
gate.go fix(artwork): honor a provider's explicit retry-later delay in the circuit breaker (#6056) 2026-09-01 11:07:58 -04:00
gate_test.go fix(artwork): honor a provider's explicit retry-later delay in the circuit breaker (#6056) 2026-09-01 11:07:58 -04:00
hash_encoder_bench_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
housekeeping.go fix(artwork): never retry absent artwork on its own (#6054) 2026-09-01 20:48:41 -04:00
housekeeping_test.go fix(artwork): never retry absent artwork on its own (#6054) 2026-09-01 20:48:41 -04:00
image_cache.go feat(cli): add an artwork command group for diagnosing and re-driving artwork (#5957) 2026-08-14 21:07:56 -04:00
image_cache_test.go feat(cli): add an artwork command group for diagnosing and re-driving artwork (#5957) 2026-08-14 21:07:56 -04:00
image_store.go feat(artwork): advertise album art for tracks whose embedded cover is the album's 2026-09-07 00:35:21 -04:00
image_store_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
library_fs.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
library_fs_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
playlist_cover.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
processor.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
processor_test.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
prune.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
prune_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
resize.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
resolve.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
resolve_test.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
sources.go feat(artwork): advertise album art for tracks whose embedded cover is the album's 2026-09-07 00:35:21 -04:00
sources_internal_test.go feat(artwork): advertise album art for tracks whose embedded cover is the album's 2026-09-07 00:35:21 -04:00
trace.go feat(artwork): store the resolution trace so artwork explain works offline (#5980) 2026-08-21 10:24:01 -04:00
trace_test.go feat(artwork): store the resolution trace so artwork explain works offline (#5980) 2026-08-21 10:24:01 -04:00
uploader.go feat(artwork): make the artwork image size cap configurable (#5931) 2026-08-11 10:42:39 -04:00
uploader_test.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
wire_providers.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
worker.go fix(artwork): never retry absent artwork on its own (#6054) 2026-09-01 20:48:41 -04:00
worker_soak_test.go fix(scrobbler): back off when a provider asks us to, instead of retrying per play (#6028) 2026-08-29 17:28:29 -04:00
worker_test.go fix(artwork): never retry absent artwork on its own (#6054) 2026-09-01 20:48:41 -04:00
worker_timing_test.go fix(artwork): ramp the external circuit breaker back up instead of closing on one answer (#5961) 2026-08-15 10:36:14 -04:00