mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(feeds): torznab parse category and freeleech (#492)
* feat(feeds): torznab parse freeleech * feat(feeds): torznab parse categories
This commit is contained in:
parent
924899d9f3
commit
b7d2161fdb
10 changed files with 478 additions and 57 deletions
|
@ -160,23 +160,23 @@ func TestClient_GetCaps(t *testing.T) {
|
|||
SupportedParams: "q",
|
||||
},
|
||||
},
|
||||
Categories: Categories{Category: []Category{
|
||||
Categories: CapCategories{Categories: []Category{
|
||||
{
|
||||
ID: "2000",
|
||||
ID: 2000,
|
||||
Name: "Movies",
|
||||
Subcat: []SubCategory{
|
||||
SubCategories: []Category{
|
||||
{
|
||||
ID: "2010",
|
||||
ID: 2010,
|
||||
Name: "Foreign",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "5000",
|
||||
ID: 5000,
|
||||
Name: "TV",
|
||||
Subcat: []SubCategory{
|
||||
SubCategories: []Category{
|
||||
{
|
||||
ID: "5040",
|
||||
ID: 5040,
|
||||
Name: "HD",
|
||||
},
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ func TestClient_GetCaps(t *testing.T) {
|
|||
t.Run(tt.name, func(t *testing.T) {
|
||||
c := NewClient(Config{Host: tt.fields.Host, ApiKey: tt.fields.ApiKey})
|
||||
|
||||
got, err := c.GetCaps()
|
||||
got, err := c.FetchCaps()
|
||||
if tt.wantErr && assert.Error(t, err) {
|
||||
assert.EqualErrorf(t, err, tt.expectedErr, "Error should be: %v, got: %v", tt.wantErr, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue