feat: complete task 3 - fix sync.go cache-hit path to use centralized filter
This commit is contained in:
1 parent
9e4d2385ff
commit
41e5e079d4
2 files changed
+8
-46
No files matched your search
@@ -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