mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-01 07:21:17 +00:00
fix(artwork): include M3U external art flag in the config fingerprint
This commit is contained in:
parent
bc30ce67c6
commit
7713a6d6b2
@ -27,9 +27,9 @@ var staleAbsentKinds = []string{"ar", "al", "pl", "ra"}
|
||||
// Fingerprint summarizes the config knobs that affect artwork resolution outcomes; a
|
||||
// change means previously resolved (or absent) state may no longer be correct.
|
||||
func Fingerprint() string {
|
||||
raw := fmt.Sprintf("%s|%s|%s|%s|%t|%s",
|
||||
raw := fmt.Sprintf("%s|%s|%s|%s|%t|%t|%s",
|
||||
conf.Server.CoverArtPriority, conf.Server.ArtistArtPriority, conf.Server.ArtistImageFolder,
|
||||
conf.Server.Agents, conf.Server.EnableExternalServices, consts.Version)
|
||||
conf.Server.Agents, conf.Server.EnableExternalServices, conf.Server.EnableM3UExternalAlbumArt, consts.Version)
|
||||
sum := md5.Sum([]byte(raw)) //nolint:gosec // fingerprint, not security-sensitive
|
||||
return hex.EncodeToString(sum[:])
|
||||
}
|
||||
|
||||
@ -79,6 +79,13 @@ var _ = Describe("Housekeeping", func() {
|
||||
conf.Server.ArtistImageFolder = "/after"
|
||||
Expect(Fingerprint()).NotTo(Equal(f1))
|
||||
})
|
||||
|
||||
It("changes when EnableM3UExternalAlbumArt is toggled", func() {
|
||||
conf.Server.EnableM3UExternalAlbumArt = false
|
||||
f1 := Fingerprint()
|
||||
conf.Server.EnableM3UExternalAlbumArt = true
|
||||
Expect(Fingerprint()).NotTo(Equal(f1))
|
||||
})
|
||||
})
|
||||
|
||||
Describe("Backfill", func() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user