M483: release-group ids for Lidarr #139

Merged
bvandeusen merged 3 commits from dev into main 2026-10-07 12:29:13 -04:00
Owner

Lidarr's metadata is keyed by MusicBrainz release group, but re-acquisition requested albums by release id, so every add came back "not found" (#5241).

  • 5c19a916: albums.release_group_mbid (migration 0070), read from tags; tagReadVersion 3 re-reads tags on the next scan (#5242)
  • 2b4e274b: tags.ReleaseGroupForRelease, a MusicBrainz release → group lookup on the shared rate limiter (#5243)
  • e509d7d5: the sweeper requests by group, the reconciler repoints stored release-id requests, and completion matches by release or group and needs a present track (#5244)

CI run 8533 is green on e509d7d5.

🤖 Generated with Claude Code

Lidarr's metadata is keyed by MusicBrainz release group, but re-acquisition requested albums by release id, so every add came back "not found" (#5241). - 5c19a916: albums.release_group_mbid (migration 0070), read from tags; tagReadVersion 3 re-reads tags on the next scan (#5242) - 2b4e274b: tags.ReleaseGroupForRelease, a MusicBrainz release → group lookup on the shared rate limiter (#5243) - e509d7d5: the sweeper requests by group, the reconciler repoints stored release-id requests, and completion matches by release or group and needs a present track (#5244) CI run 8533 is green on e509d7d5. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 3 commits 2026-10-07 12:29:09 -04:00
feat(library): store each album's MusicBrainz release-group id (M483 #5242)
release / govulncheck (push) Successful in 22s
release / web (push) Successful in 1m14s
release / go (push) Successful in 1m33s
release / integration (push) Successful in 4m36s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / android (push) Canceled after 5m24s
release / Build signed APK (releases and dev) (push) Canceled after 5m29s
5c19a916ba
albums.mbid is the release id (Picard's musicbrainz_albumid, one edition).
Lidarr names albums by release group, so re-acquisition and request
completion need that id too (#5241).

Migration 0070 adds albums.release_group_mbid (nullable, non-unique index:
several releases share a group). The scanner reads musicbrainz_releasegroupid
through extractReleaseGroupMBID, writes it on insert and heals it onto
existing rows when NULL. tagReadVersion goes to 3 so the next scan fills
it for the library already indexed, bound by tag reads (no ffprobe, no
decode).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReleaseGroupForRelease asks /ws/2/release/<id>?inc=release-groups through
the registered MusicBrainz provider, so it shares that provider's client
and 1 req/s limiter with tag enrichment and respects its on/off switch.
ErrNotFound when switched off or MusicBrainz has no such release (an id
that is already a release group included); ErrTransient to retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(lidarr): ask Lidarr for release groups; repair stored release-id requests (M483 #5244)
release / web (push) Successful in 1m41s
release / go (push) Successful in 2m33s
release / govulncheck (push) Successful in 22s
release / integration (push) Successful in 6m0s
release / android (push) Successful in 6m7s
release / Build signed APK (releases and dev) (push) Successful in 6m8s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 1m43s
release / Verify release artifacts (tag releases only) (push) Skipped
e509d7d5a9
Lidarr's metadata is keyed by MusicBrainz release group, but re-acquisition
requested albums by their release id, so every add came back "not found".

- Sweeper requests an album by its tag-supplied release group, else the one
  MusicBrainz names (cached onto the album). An album MusicBrainz cannot name
  is skipped and counted, with no attempt spent.
- Reconciler: an add refused as not found re-reads the request's album id as
  a release (library first, then MusicBrainz), rewrites the request to the
  group and adds again. This repairs the requests already stored.
- Completion matches an album by release id or release group, and only once a
  track of it is on disk, so a re-acquisition request no longer completes
  against the row of the album it is trying to bring back.

Closes #5241.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit 3bdfa94f39 into main 2026-10-07 12:29:13 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#139