fix: address code review findings

This commit is contained in:
2026-07-19 19:22:18 +03:00
parent f1839ad9e7
commit 401c1218b6
4 changed files with 21 additions and 14 deletions

View File

@@ -28,7 +28,7 @@ func ScanArtist(ctx context.Context, db *database.DB, artistID string, threshold
return nil, err
}
missing := FindMissingReleases(local, external, resolveThreshold(threshold))
missing := FindMissingReleases(local, external, threshold)
return missing, nil
}
@@ -46,8 +46,6 @@ func ScanAll(ctx context.Context, db *database.DB, threshold float64) ([]Missing
return nil, err
}
resolved := resolveThreshold(threshold)
var all []MissingRelease
for _, s := range settings {
if err := ctx.Err(); err != nil {
@@ -58,7 +56,7 @@ func ScanAll(ctx context.Context, db *database.DB, threshold float64) ([]Missing
}
// A transient error for one artist must not abort the whole scan and
// take down the daemon; log it and continue with the remaining artists.
missing, err := ScanArtist(ctx, db, s.ID, resolved)
missing, err := ScanArtist(ctx, db, s.ID, threshold)
if err != nil {
log.Printf("scan artist %s failed: %v", s.ID, err)
continue