Closed fbjerggaard closed 4 years ago
Please always attach the debug infos zip (as mentioned in the issues template).
I assume the result that's being downloaded doesn't have a pubdate.
@theotherp The debug zip contains sensitive information I do not feel comfortable posted publicly on Github.
The file download fails with a HTTP 500 error. The age is shown correctly when doing a search against the affected indexer, so everything except downloading is working fine.
You can upload the file to https://ufile.io/ and send me the link.
You're the first to report his problem and write that you use a custom-made indexer, so please understand that I'm a bit suspicious here...
Error 500 is a direct result of the NPE which is caused by either the pubdate or the age of the search result being empty. So if you say that the age is being shown correctly the pubdate must be empty. I'll take a closer look where that value should come from and how the age is calculated originally, but I still think the root cause lies in an unexpected indexer output. To determine that I'd need to see the XML output from the indexer that delivered that result. Then I can parse that and see if all values are filled correctly.
Hi,
Here is an example of an output from the indexer:
<item>
<newznab:attr name="language" value="English" />
<newznab:attr name="category" value="5000" />
<newznab:attr name="usenetdate" value="Sun, 27 Oct 2019 12:02:48 +00:00" />
<newznab:attr name="guid" value="ashdhnsfdgjj77" />
<newznab:attr name="size" value="11260142" />
<category>HD / Series</category>
<enclosure length="11260142" type="application/x-nzb" url="https://a.direct.link.to.nzb" />
<guid isPermaLink="true">https://a.direct.link.to.nzb</guid>
<link>https://a.direct.link.to.nzb</link>
<pubDate>Sun, 27 Oct 2019 12:02:48 +00:00</pubDate>
<title>nzb.title</title>
</item>
That should conform to the basics of the newznab specification where pubDate isn't actually mentioned at all.
Searching for the same item in the interface reveals this result where the date is parsed correctly:
I do understand your suspiciousness :) I'll see if I can get to upload the debug file from a clean test-install of nzbhydra later today so the logs won't be full of other stuff to make debugging harder.
Please execute this SQL query in the debug section of NZBHydra: select title, pub_date, first_found from searchresult x where x.pub_date is null or x.first_found is null
. This will log any search result of which a download will cause an error. Check with your indexer if the pubdate is not set for that result.
You linked the predefined newznab attributes but pubDate is mentioned in the "Important fields of the returned data (RSS)" section. That's where Hydra reads it from.
Thanks for the query. The problem was that nzbhydra2 had cached the results - which in itself is perfectly fine - before I had fixed the date to show in the correct format. A quick DELETE from searchresult x where x.pub_date is null or x.first_found is null
fixed the issue and now the query returns 0 records instead of 10k+ :)
Closing here since it is irrelevant and the problem was on my side in the end.
I get the following error when downloading an NZB through NZBHydra2. The indexer is a custom-made one that works fine when used directly in Sonarr, so the output from it should conform to the standards.
I am running NZBHydra2 version 2.8.0