Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG Api not passing categories #704

Closed
phuqwit opened this issue Apr 22, 2021 · 7 comments
Closed

BUG Api not passing categories #704

phuqwit opened this issue Apr 22, 2021 · 7 comments

Comments

@phuqwit
Copy link

phuqwit commented Apr 22, 2021

I have sabnzbd+ fetching an RSS feed from nzbyhdra2 version 3.14
(This past few weeks the number of downloads have tailed off so this might have been something prior to 3.14)
I fetch the url:
http://server-ip:5076/api?apikey=??&cat=7000&limit=500&t=search&offset=0
The results that come back show:

--
https://nzbfinder.ws/details/...
...
newznab:attr name="category" value="5020"
...
So the category isn't getting passed. The logs confirm this...

--

2021-04-22 09:24 |   | Newznab | nzb.su: Calling https://api.nzb.su/api?apikey=??&t=search&extended=1&password=1&limit=100&offset=0
2021-04-22 09:24 |   | Newznab | NZBFinder: Calling https://nzbfinder.ws/api?apikey=??&t=search&extended=1&password=1&limit=100&offset=0
...
2021-04-22 09:24 |   | ExternalApi | Received external newznab API call: NewznabParameters{t=SEARCH, cat=[7000], offset=0, limit=500, raw=false, o=XML, attrs=[], extended=false, indexers=[]}


@theotherp
Copy link
Owner

Post your debug infos.

@phuqwit
Copy link
Author

phuqwit commented Apr 22, 2021

@phuqwit
Copy link
Author

phuqwit commented Apr 22, 2021

That was the last line in my first comment
Logs:

2021-04-22 09:24 |   | ExternalApi | Executing new search
2021-04-22 09:24 |   | ExternalApi | Received external newznab API call: NewznabParameters{t=SEARCH, cat=[7000], offset=0, limit=500, raw=false, o=XML, attrs=[], extended=false, indexers=[]}
2021-04-22 09:16 |   | ExternalApi | Search took 5601ms. Returning 100 results

Debugs

2021-04-22 09:16:55.231 INFO --- [http-nio-IP4:b36f1589-5] org.nzbhydra.api.ExternalApi : [ID: 99609, Host: ] Search took 5601ms. Returning 100 results
2021-04-22 09:24:38.404 INFO --- [http-nio-IP4:b36f1589-5] org.nzbhydra.api.ExternalApi : [ID: 00967, Host: ]}
2021-04-22 09:24:39.355 INFO --- [http-nio-IP4:b36f1589-5] org.nzbhydra.api.ExternalApi : [ID: 00967, Host: ] Executing new search

@theotherp
Copy link
Owner

It looks like for some reason the line is not properly printed to the log file. Interesting...

@phuqwit
Copy link
Author

phuqwit commented Apr 22, 2021

I just added &cat=7000,7010 to the url string. That appears to return a bunch of 7010 categories but no other 70X0 categories. Odd.
In which case...
Received external newznab API call: NewznabParameters{t=SEARCH, cat=[7000, 7010], offset=0, limit=500, raw=false, o=XML, attrs=[], extended=false, indexers=[]}
but..
NZBFinder: Calling https://nzbfinder.ws/api?apikey=??&t=search&extended=1&password=1&cat=7010&limit=100&offset=0

@theotherp
Copy link
Owner

I can reproduce the problem.

The option to transform newznab categories is enabled. That means the category used in the request (7000)s is mapped to a hydra category. You don't have any categories matching that so it's mapped to "All" which doesnt't have a specific newznab category.

I'll change the code so that in these cases the newznab category provided in the search request is used.

@phuqwit
Copy link
Author

phuqwit commented Apr 22, 2021

Disabled the transform newznab categories option and we're back in business. Thanks

@phuqwit phuqwit closed this as completed Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants