fix(server/m7-379): enricher leaves cover_art_source NULL when MBID missing

This commit is contained in:
2026-05-04 19:04:16 -04:00
parent 6c6c4bc1e4
commit b8f9b3891b
2 changed files with 9 additions and 5 deletions
+6 -2
View File
@@ -63,11 +63,15 @@ func (e *Enricher) EnrichAlbum(ctx context.Context, albumID pgtype.UUID) error {
}
// Step 2: MBCAA fallback. Requires fetcher + toggle on + MBID.
// When the toggle is disabled OR the album has no MBID, leave
// cover_art_source NULL so a future scan can retry once the
// scanner heals the MBID. 'none' is reserved for genuine MBCAA
// 404s where we know the album really isn't in the archive.
if !e.mbcaaOn || e.fetcher == nil {
return e.recordCover(ctx, albumID, "", "none")
return nil
}
if row.Mbid == nil || *row.Mbid == "" {
return e.recordCover(ctx, albumID, "", "none")
return nil
}
body, err := e.fetcher.Fetch(ctx, *row.Mbid)