feat: complete task 3 - fix sync.go cache-hit path to use centralized filter
This commit is contained in:
@@ -65,16 +65,7 @@ func SyncArtistDiscography(
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("sync artist discography: read artist filter options: %w", err)
|
||||
}
|
||||
filtered := make([]database.ExternalRelease, 0, len(cachedReleases))
|
||||
for _, r := range cachedReleases {
|
||||
if opts.IgnoreSingles && (r.Type == "Single" || hasSliceType(r.SecondaryTypes, "Single")) {
|
||||
continue
|
||||
}
|
||||
if opts.IgnoreCompilations && (r.Type == "Compilation" || hasSliceType(r.SecondaryTypes, "Compilation")) {
|
||||
continue
|
||||
}
|
||||
filtered = append(filtered, r)
|
||||
}
|
||||
filtered := ApplyTypeToggles(cachedReleases, opts)
|
||||
return filtered, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user