mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(filters): check match other
and except other
(#433)
fix(filters): check other and excpet other
This commit is contained in:
parent
48d6468503
commit
9813f5718d
2 changed files with 33 additions and 74 deletions
|
@ -286,6 +286,16 @@ func (f Filter) CheckFilter(r *Release) ([]string, bool) {
|
|||
r.addRejectionF("hdr unwanted. got: %v want: %v", r.HDR, f.ExceptHDR)
|
||||
}
|
||||
|
||||
// Other is parsed into the Other slice from rls
|
||||
if len(f.MatchOther) > 0 && !sliceContainsSlice(r.Other, f.MatchOther) {
|
||||
r.addRejectionF("match other not matching. got: %v want: %v", r.Other, f.MatchOther)
|
||||
}
|
||||
|
||||
// Other is parsed into the Other slice from rls
|
||||
if len(f.ExceptOther) > 0 && sliceContainsSlice(r.Other, f.ExceptOther) {
|
||||
r.addRejectionF("except other unwanted. got: %v unwanted: %v", r.Other, f.ExceptOther)
|
||||
}
|
||||
|
||||
if f.Years != "" && !containsIntStrings(r.Year, f.Years) {
|
||||
r.addRejectionF("year not matching. got: %d want: %v", r.Year, f.Years)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue