mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 19:47:47 +08:00
feat: fliter audios
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user