fix(artwork): preserve album cache key compatibility with v0.60.3

Restored the v0.60.3 hash input order for album artwork cache keys
(Agents + CoverArtPriority) so that existing caches remain valid on
upgrade when EnableExternalServices is true. Also ensures
CoverArtPriority is always part of the hash even when external services
are disabled, fixing a v0.60.3 bug where changing CoverArtPriority had
no effect on cache invalidation.

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2026-04-04 12:33:09 -04:00
parent 9cb4f12b48
commit a31ce7ffa3

View File

@ -61,7 +61,7 @@ func newAlbumArtworkReader(ctx context.Context, artwork *artwork, artID model.Ar
func (a *albumArtworkReader) Key() string { func (a *albumArtworkReader) Key() string {
hashInput := conf.Server.CoverArtPriority hashInput := conf.Server.CoverArtPriority
if conf.Server.EnableExternalServices { if conf.Server.EnableExternalServices {
hashInput += conf.Server.Agents hashInput = conf.Server.Agents + hashInput
} }
hash := md5.Sum([]byte(hashInput)) hash := md5.Sum([]byte(hashInput))
return fmt.Sprintf( return fmt.Sprintf(