support exclude filter #3 (category)
This commit is contained in:
parent
b7df76b76e
commit
8a5541ece4
1 changed files with 8 additions and 0 deletions
8
tree.go
8
tree.go
|
@ -104,6 +104,14 @@ func (t Tree) Filter(filter map[string][]string) (Tree, bool) {
|
|||
}
|
||||
continue
|
||||
}
|
||||
if negative && option == "category" {
|
||||
for _, category := range f.Category {
|
||||
if category == value {
|
||||
exclude = true
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
if !negative && strings.Contains(f.Meta[option], value) {
|
||||
addFile = true
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue