metadata: incremental beets import, event-driven album art re-fetch (#270) #272
No reviewers
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker!272
Loading…
Reference in a new issue
No description provided.
Delete branch "metadata/art-sync-event-driven"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Closes #270. The nightly whole-library
beet importre-autotags every album and replaces its items, so any run where MusicBrainz answers short demotes a matched album to as-is and wipes its ids;album_art_sync.pythen drops the album from tracking with no log line or notification. The 14-day recheck compounded it: it re-rolled the archive lookup for static art, and its resolved-URL comparison never matched anyway until #269.Separately, both beets profiles set
state:, which isn't a beets option (statefileis), so the retag profile's "separate state" was never separate.Fix
import: incremental: yes— existing dirs are never re-autotagged; new dirs still import;music_retag.pyalready refreshes a retagged album explicitly viabeet update.state:→statefile:in both profiles.album_art_sync.py: no interval recheck. A matched album is re-fetched only when its source changes or itscover.jpgis gone. Vanished covers are detected beforerun_beets, because fetchart backfills a missing cover with its own per-release guess first and the release-group cover should win.ALBUM_RECHECK_INTERVAL_DAYSis retired (the line inmedia/metadata/.envis now ignored and can go).beet import -q -I <dir>), since that no longer happens on its own.Verification
All on the live stack (bind-mounted), 2026-09-19:
ImportState.history_addso the first incremental run didn't re-roll everything once more (there was nostate.pickleat all before — history is only written when incremental is on). Full run afterwards: beets skipped every dir, whole sync 5 s.beet import -q -I) of the 34 albums without a release-group id: Discovery and Grace re-matched (both had been demoted again by the 00:00 nightly run on the old config, after being restored yesterday — the flapping, live); the other 31 stayed as-is, so they're the retag backlog, not flapping victims. Release-group count 72 → 74.cover.jpg, ran the sync — fetchart backfilled it first, then the script reported1 refetch,UPDATED: The Beatles/Rubber Soul, and the file is the 120 KB release-group thumbnail again with the state's resolved key unchanged. Grace and Discovery came in as2 new.processing 0 this run (0 new, 0 refetch, 0 retry queued).stateisn't an option,statefileis c91bea3526