mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(filters): add music filters (#91)
* feat(filters): add music filters * feat: improve parsing and filtering * feat: add red api support
This commit is contained in:
parent
30c11d4ef1
commit
00bc8298ac
20 changed files with 1053 additions and 52 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/autobrr/autobrr/pkg/btn"
|
||||
"github.com/autobrr/autobrr/pkg/ggn"
|
||||
"github.com/autobrr/autobrr/pkg/ptp"
|
||||
"github.com/autobrr/autobrr/pkg/red"
|
||||
)
|
||||
|
||||
type APIService interface {
|
||||
|
@ -104,6 +105,13 @@ func (s *apiService) AddClient(indexer string, settings map[string]string) error
|
|||
}
|
||||
s.apiClients[indexer] = ggn.NewClient("", key)
|
||||
|
||||
case "redacted":
|
||||
key, ok := settings["api_key"]
|
||||
if !ok || key == "" {
|
||||
return fmt.Errorf("api_service: could not initialize red client: missing var 'api_key'")
|
||||
}
|
||||
s.apiClients[indexer] = red.NewClient("", key)
|
||||
|
||||
default:
|
||||
return fmt.Errorf("api_service: could not initialize client: unsupported indexer '%v'", indexer)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue