feat: fliter audios

This commit is contained in:
Simon Ding
2024-08-12 14:23:20 +08:00
parent 712bf84c90
commit 5c01c45068

View File

@@ -9,6 +9,7 @@ import (
"net/url" "net/url"
"polaris/db" "polaris/db"
"polaris/log" "polaris/log"
"slices"
"strconv" "strconv"
"time" "time"
@@ -76,6 +77,9 @@ func (i *Item) GetAttr(key string) string {
func (r *Response) ToResults(indexer *db.TorznabInfo) []Result { func (r *Response) ToResults(indexer *db.TorznabInfo) []Result {
var res []Result var res []Result
for _, item := range r.Channel.Item { for _, item := range r.Channel.Item {
if slices.Contains(item.Category, "3000") { //exclude audio files
continue
}
r := Result{ r := Result{
Name: item.Title, Name: item.Title,
Link: item.Link, Link: item.Link,