-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
caps.go
61 lines (59 loc) · 1.36 KB
/
caps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package adapter
import (
"context"
"github.com/bitmagnet-io/bitmagnet/internal/torznab"
"strings"
)
func (a adapter) Caps(context.Context) (torznab.Caps, error) {
return torznab.Caps{
Server: torznab.CapsServer{
Title: a.title,
},
Limits: torznab.CapsLimits{
Max: a.maxLimit,
Default: a.defaultLimit,
},
Searching: torznab.CapsSearching{
Search: torznab.CapsSearch{
Available: "yes",
SupportedParams: strings.Join([]string{
torznab.ParamQuery,
torznab.ParamImdbId,
torznab.ParamTmdbId,
}, ","),
},
TvSearch: torznab.CapsSearch{
Available: "yes",
SupportedParams: strings.Join([]string{
torznab.ParamQuery,
torznab.ParamImdbId,
torznab.ParamTmdbId,
torznab.ParamSeason,
torznab.ParamEpisode,
}, ","),
},
MovieSearch: torznab.CapsSearch{
Available: "yes",
SupportedParams: strings.Join([]string{
torznab.ParamQuery,
torznab.ParamImdbId,
torznab.ParamTmdbId,
}, ","),
},
MusicSearch: torznab.CapsSearch{
Available: "yes",
SupportedParams: torznab.ParamQuery,
},
AudioSearch: torznab.CapsSearch{
Available: "no",
},
BookSearch: torznab.CapsSearch{
Available: "yes",
SupportedParams: torznab.ParamQuery,
},
},
Categories: torznab.CapsCategories{
Categories: torznab.TopLevelCategories,
},
}, nil
}