Sonarr and dutplanet (newznab)

I’m trying to add dutplanet.net as a newznab indexer.
It seems to work fine at first, in that it finds releases with this indexer. But then when it tries to download the nzb it fails.
I get en errror getting nzb from indexer.

It’s creating these errors:

Downloading nzb for episode ‘Dokter Tinus S03E08 DUTCH 720p HDTV x264’ failed (609855): Unable to connect to the remote server

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A socket operation was attempted to an unreachable network 0.9.78.63:80
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.h.ttpWebRequest.GetResponse()
   at NzbDrone.Common.h.ttp.h.ttpClient.Execute(h.ttpRequest request) in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Common\h.ttp\h.ttpClient.cs:line 86
   at NzbDrone.Common.h.ttp.h.ttpClient.Get(h.ttpRequest request) in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Common\h.ttp\h.ttpClient.cs:line 155
   at NzbDrone.Core.Download.UsenetClientBase`1.Download(RemoteEpisode remoteEpisode) in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Core\Download\UsenetClientBase.cs:line 57

The ip address it tries seems odd:

A socket operation was attempted to an unreachable network 0.9.78.63:80

I also took a look at the xml coming from the dutplanet api. An item looks like this:

<item id="581331">
<id>581331</id>
<infoid>274687</infoid>
<title>Chef (2014) HDrip X264 AAC</title>
<category>Movies > HD</category>
<pubDate>Wed, 6 Aug 2014 19:39:37</pubDate>
<guid isPermaLink="true">581331</guid>
<link>581331</link>
<comments>
h.ttp://dutplanet.net/info.php?id=581331&spotinfo=1&infoid=274687
</comments>
<newznab:attr name="category" value="2040"/>
<newznab:attr name="size" value="904147968"/>
<enclosure url="h.ttp://dutplanet.net/connect/nzbdown.php?id=581331&api=*******" length="904147968" type="application/x-nzb"/>
</item>

The correct link to the nzb seems to be in the url part of the enclosure element. The link element only has an id.
Now if I compare this xml to for example one that comes from nzbplanet.net:

<item>
<title>Snowpiercer.2013.1080p.BluRay.Dts.x264-CYTSUNEE</title>
<guid isPermaLink="true">
h.ttps://nzbplanet.net/details/d83276a5888e9d55c4ae70f34e77e67e
</guid>
<link>
h.ttps://nzbplanet.net/getnzb/d83276a5888e9d55c4ae70f34e77e67e.nzb&i=185622&r=****
</link>
<comments>
h.ttps://nzbplanet.net/details/d83276a5888e9d55c4ae70f34e77e67e#comments
</comments>
<pubDate>Sun, 24 Aug 2014 19:37:39 +0200</pubDate>
<category>Movies > HD</category>
<description>Snowpiercer.2013.1080p.BluRay.Dts.x264-CYTSUNEE</description>
<enclosure url="h.ttps://nzbplanet.net/getnzb/d83276a5888e9d55c4ae70f34e77e67e.nzb&i=185622&r=***" length="14391398153" type="application/x-nzb"/>
<newznab:attr name="category" value="2000"/>
<newznab:attr name="category" value="2040"/>
<newznab:attr name="size" value="14391398153"/>
<newznab:attr name="guid" value="d83276a5888e9d55c4ae70f34e77e67e"/>
</item>

Nzbplanet seems to add the link the the nzb in the link element as well.
I’m wondering if this problem is being caused by dutplanet sendin incorrect xml or sonarr is just parsing something incorrect.

BTW I changed http / https to h.ttp / h.ttps in this mail because the forum will only accept 2 links from new users.

Having a number as link makes little sense.

@markus101 We could default to enclosure for Newznab if present. What do you think?

I’d say this is a bit of both, dutplanet should be putting a link in the link attribute, not a number, but drone should be smart enough to handle that.

Yeah, I think thats safe, we should also think about ensuring its a valid link, just as a safety net.

@mr_riotrick You should reset your API keys, I believe that they were included in the XML.

API keys have been reset, also removed them from the old ones from this post.

Did this ever make it in?

Yes, the enclosure URL is used if the link is not a valid link.

Great! I can move my dutch shows over to sonarr and get rid of sickbeard :slight_smile: