feat: complete filter centralization pattern and document in CLAUDE.md

This commit is contained in:
2026-07-26 13:03:37 +03:00
parent f697ebf2f5
commit aec9d89435
7 changed files with 267 additions and 13 deletions

View File

@@ -33,6 +33,15 @@ func ScanArtist(ctx context.Context, db *database.DB, artistID string, threshold
// the MusicBrainz cache to expire and prune rows on the next re-sync.
settings, err := database.GetArtistSettings(db, artistID)
if err != nil {
// If artist settings don't exist, use empty filter (no filtering)
if err == database.ErrArtistNotFound {
filter := TypeFilter{
IgnoreSingles: false,
IgnoreCompilations: false,
}
missing := FindMissingReleases(local, external, threshold, filter)
return missing, nil
}
return nil, err
}
filter := TypeFilter{