fix: address code review findings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user