diff --git a/cmd/artwork.go b/cmd/artwork.go index 0d688ec81..99c4001c7 100644 --- a/cmd/artwork.go +++ b/cmd/artwork.go @@ -232,15 +232,16 @@ func formatStatus(rep statusReport) string { // backfillState leads with the queued backlog: by the time anyone runs this, backfill has usually // already stored the new fingerprint, and "up to date" would bury the flood it is still working through. func backfillState(rep statusReport) string { - changed := "fingerprint up to date" - if rep.stored != rep.current { - changed = "fingerprint changed" - } + // A stale stored fingerprint means backfill has not recorded the new one, so the flood repeats. + pending := "fingerprint changed — every artist, album, playlist and radio will be re-enqueued on the next startup" if n := rep.backfillQueued(); n > 0 { - return fmt.Sprintf("backfill running: %d items queued (%s)", n, changed) + if rep.stored != rep.current { + return fmt.Sprintf("backfill running: %d items queued, and %s", n, pending) + } + return fmt.Sprintf("backfill running: %d items queued (fingerprint up to date)", n) } if rep.stored != rep.current { - return "fingerprint changed — every artist, album, playlist and radio will be re-enqueued on the next startup" + return pending } return "up to date" } diff --git a/cmd/artwork_test.go b/cmd/artwork_test.go index 1a3d5b880..16407bbb4 100644 --- a/cmd/artwork_test.go +++ b/cmd/artwork_test.go @@ -587,6 +587,15 @@ var _ = Describe("formatStatus", func() { Expect(out).To(ContainSubstring("fingerprint up to date")) }) + It("keeps the re-enqueue warning while a backfill is already running", func() { + rep.stored = "older" + + out := block(formatStatus(rep), "Backfill") + Expect(out).To(MatchRegexp(`State:\s+backfill running: 2 items queued`)) + Expect(out).To(ContainSubstring("re-enqueued"), + "the stored fingerprint is still stale, so a second full re-enqueue is pending on top of this one") + }) + It("reports up to date only once the backfill has drained", func() { rep.queue = []model.ArtworkQueueStat{{ItemKind: "al", Priority: model.ArtworkPriorityScan, Count: 1}}