Using the bitmetv RSS feed, Sonarr is successfully matching items on the feed, but failing to download the .torrent and pass it to the download client. The debug log is below, but I’m guessing it’s some bad parsing of the URL from the RSS?
[Warn] ProcessDownloadDecisions: Couldn’t add report to download queue. REM
System.InvalidCastException: Cannot cast from source type to destination type.
at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x0000c] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Http\HttpClient.cs:36
at NzbDrone.Common.Http.HttpClient.Get (NzbDrone.Common.Http.HttpRequest request) [0x00007] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Http\HttpClient.cs:164
at NzbDrone.Core.Download.TorrentClientBase1[NzbDrone.Core.Download.Clients.Transmission.TransmissionSettings].DownloadFromWebUrl (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String torrentUrl) [0x00021] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Download\TorrentClientBase.cs:106 at NzbDrone.Core.Download.TorrentClientBase1[NzbDrone.Core.Download.Clients.Transmission.TransmissionSettings].DownloadFromWebUrl (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String torrentUrl) [0x0008f] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Download\TorrentClientBase.cs:121
at NzbDrone.Core.Download.TorrentClientBase1[NzbDrone.Core.Download.Clients.Transmission.TransmissionSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00093] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Download\TorrentClientBase.cs:85 at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x000fb] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Download\DownloadService.cs:44 at NzbDrone.Core.Download.ProcessDownloadDecisions.ProcessDecisions (System.Collections.Generic.List1 decisions) [0x00146] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Download\ProcessDownloadDecisions.cs:74
So it looks like it gets a valid HTTP url out of the RSS, and I can manually download that fine, but Sonarr gets a 302 redirect to login.php and it all goes wrong.
This sort of implies its not using the cookie data correct, but I have that all setup and it passes the indexer test fine…
Sonarr sends the cookie with the RSS feed request, but if memory serves its not actually required to get the RSS, so its possible the cookie is incorrect and causes it to fail when grabbing it, at least thats my educated guess.
That’s surprising coz we added the cookie to the rss after a bitmetv user helped us fix it. I assumed that that user also tested downloads. We didn’t add the cookie to the download url.
Sorry for the late response! Testing with latest development, a cookie now gets sent with the download.php request, however it is not the cookie defined in the indexer settings.
This is what happens:
GET rss.php with no cookie, which is all correct
The HTTP response to this, contains a Set-Cookie header, sonarr seems to save this and sends it out with the download.php request, rather than the one defined in index.php. It’s just a cloud hosting cache cookie type thing that gets set.
I hope that makes sense as a bug, so basically the set-cookie header is saved and used for download.php rather than the one defined in the indexer settings.
Ah, so the CookeContainer I created to preserve the stored cookie between rss and download link gets overridden by the cookie returned on the rss call? Didn’t see that one coming.
It’s odd though, wouldn’t that mess up your browser too when you access the rss feed? Could you confirm that?
If you visit the rss.php in the browser without being logged in, no cookie is sent. This all works because the pass keys are all in the GET request. A cloudfair cookie id is returned with the rss data in Set-Cookie header - Sonarr needs to ignore this.
Note that if you’re logged in, the browser will send the cookie anyway to rss.php, the Set-cookie is then appended to the existing cookie, rather than replacing it. i.e. the __cfduid part is added/updated in the cookie.
Sonarr currently sends no cookie to rss.php and gets a Set-Cookie back with __cfduid set (same as a browser).
When Sonnar visits download.php, only the __cfduid cookie is sent - nothing in the indexer settings cookie goes out. As a result, you get a redirect to login.php.
This means either:
Set-Cookie completely replaces the indexer defined cookie
Sonarr is using the new cookie and just ignoring the indexer defined cookie.
Any update on this. Using the latest dev version of sonarr Version2.0.0.3211 and still can not get BitMeTV to work with either the BitMeTV indexer or the Torrent RSS feed
I am having issues connecting to BitMeTV on Sonarr version 2.0.0.3243 and it throws the following error:
Message:
Unable to connect to indexer: Indexer API call resulted in an unexpected StatusCode [Redirect]: Indexer API call resulted in an unexpected StatusCode [Redirect]
Exception:
NzbDrone.Core.Indexers.Exceptions.IndexerException: Indexer API call resulted in an unexpected StatusCode [Redirect]
at NzbDrone.Core.Indexers.RssParser.PreProcess (NzbDrone.Core.Indexers.IndexerResponse indexerResponse) [0x000a1] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\RssParser.cs:105
at NzbDrone.Core.Indexers.RssParser.ParseResponse (NzbDrone.Core.Indexers.IndexerResponse indexerResponse) [0x00006] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\RssParser.cs:40
at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.BitMeTv.BitMeTvSettings].FetchPage (NzbDrone.Core.Indexers.IndexerRequest request, IParseIndexerResponse parser) [0x0005c] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:204
at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.BitMeTv.BitMeTvSettings].TestConnection () [0x0000e] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:218
Any ideas? I have confirmed that my userid, RSS passkey and cookie have been entered correctly