navidrome/core/artwork
Deluan Quintão f48416685f
fix(artwork): fix stale cache and top-level album artwork for multi-disc albums (#5457)
* fix(artwork): include top-level album folders in parent cover art lookup

The Path != "." guard added in #5451 was too aggressive — it excluded
any folder with Path=".", which includes top-level album folders (not
just the library root). Changed to ParentID != "" which correctly
excludes only the actual library root folder.

Fixes #5456

* fix: correct comment in test — album is under library root, not artist root

* test: add ascii tree diagram to top-level album e2e test

* test: replace internal bug references with issue link in e2e comments

Signed-off-by: Deluan <deluan@navidrome.org>

* test: add e2e test matching reporter's exact library layout (#5456)

Adds a deeply nested test (Genre/Artist/Album/Disc) with 12 discs
using the reporter's actual folder names to verify artwork resolution
works for non-top-level album folders too.

* fix(scanner): use a syntectic admin user when no admin user is found

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(scanner): bump album UpdatedAt on Phase 3 refresh to invalidate artwork cache

When Phase 3 corrects an album's FolderIDs (or any other field), bump
UpdatedAt to the current time. This ensures the artwork cache key changes,
invalidating any stale artwork that was resolved and cached during Phase 1
when the album had incomplete folder data.

* fix(artwork): include ImportedAt in artwork cache key to invalidate stale cache

Reverts the Phase 3 UpdatedAt bump (which would change album.UpdatedAt
semantics) and instead includes album.ImportedAt in the artwork cache key
computation. Since ImportedAt is bumped to time.Now() on every album Put,
any Phase 3 correction naturally invalidates cached artwork that was
resolved mid-scan with incomplete folder data.

* fix(artwork): simplify lastUpdate logic using TimeNewest utility

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-05-04 17:26:39 -04:00
..
e2e fix(artwork): fix stale cache and top-level album artwork for multi-disc albums (#5457) 2026-05-04 17:26:39 -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(ui): add cover art support for internet radio stations (#5229) 2026-03-18 18:57:33 -04:00
artwork_internal_test.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
artwork_suite_test.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
artwork_test.go Fix image stuttering (#3035) 2024-05-24 20:19:26 -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_e2e_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 perf(artwork): improve image serving performance with WebP encoding and optimized pipeline (#5181) 2026-03-13 09:35:59 -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
cache_warmer.go fix(artwork): address WebP performance regression on low-power hardware (#5286) 2026-04-04 15:17:01 -04:00
cache_warmer_test.go fix(artwork): address WebP performance regression on low-power hardware (#5286) 2026-04-04 15:17:01 -04:00
image_cache.go Add lastUpdated to coverArt ids. Helps with invalidating art cache client-side. 2023-02-08 20:03:31 -05:00
library_fs.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
library_fs_test.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
reader_album.go fix(artwork): fix stale cache and top-level album artwork for multi-disc albums (#5457) 2026-05-04 17:26:39 -04:00
reader_album_test.go fix(artwork): fix stale cache and top-level album artwork for multi-disc albums (#5457) 2026-05-04 17:26:39 -04:00
reader_artist.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
reader_artist_test.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
reader_disc.go fix(artwork): fix stale cache and top-level album artwork for multi-disc albums (#5457) 2026-05-04 17:26:39 -04:00
reader_disc_test.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
reader_mediafile.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
reader_playlist.go feat(ui): increase cover art size to 600px and use CatmullRom scaling 2026-03-22 14:55:14 -04:00
reader_radio.go feat(ui): add cover art support for internet radio stations (#5229) 2026-03-18 18:57:33 -04:00
reader_radio_test.go feat(ui): add cover art support for internet radio stations (#5229) 2026-03-18 18:57:33 -04:00
reader_resized.go fix(artwork): address WebP performance regression on low-power hardware (#5286) 2026-04-04 15:17:01 -04:00
reader_resized_test.go fix(artwork): preserve animation for square thumbnails with animated images 2026-04-01 08:38:29 -04:00
sources.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
sources_internal_test.go refactor(artwork): migrate readers to storage.MusicFS and add e2e suite (#5379) 2026-04-26 18:16:14 -04:00
wire_providers.go Handle "naked" CoverArtIDs (IDs of album, mediafiles and playlists) 2022-12-28 15:31:56 -05:00