Fixed: TorrentRssParser incorrectly detected description element.

pull/4/head
Taloth Saldono 10 years ago
parent 102f2e39be
commit c02d6c426c

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>Doki Fansubs Torrents (latest)</title>
<link>http://tracker.anime-index.org/index.php?page=torrents&amp;search=doki&amp;category=0&amp;active=0</link>
<description>[Doki] Torrents RSS (generated by Yukinrss)</description>
<ttl>15</ttl>
<pubDate>Thu, 02 Jul 2015 08:18:28 GMT</pubDate>
<generator>Yukinrss 1.03.58 (http://yukinrss.net/)</generator>
<image>
<url>http://yukinrss.net/img/rss-doki.png</url>
<title>Doki Fansubs Torrents (latest)</title>
<link>http://tracker.anime-index.org/index.php?page=torrents&amp;search=doki&amp;category=0&amp;active=0</link>
<width>144</width>
<height>52</height>
</image>
<item>
<title>[Doki] PriPara 50 (848x480 h264 AAC) [6F0B49FD] mkv</title>
<pubDate>Thu, 02 Jul 2015 08:18:29 GMT</pubDate>
<link>http://tracker.anime-index.org/index.php?page=torrents&amp;search=doki&amp;category=0&amp;active=0</link>
<guid isPermaLink="true">http://tracker.anime-index.org/download.php?id=82d8ad84403e01a7786130905ca169a3429e657f&amp;f=%5BDoki%5D+PriPara+-+50+%28848x480+h264+AAC%29+%5B6F0B49FD%5D.mkv.torrent</guid>
<enclosure url="http://tracker.anime-index.org/download.php?id=82d8ad84403e01a7786130905ca169a3429e657f&amp;f=%5BDoki%5D+PriPara+-+50+%28848x480+h264+AAC%29+%5B6F0B49FD%5D.mkv.torrent" type="application/x-bittorrent" length="15360"/>
</item>
<item>
<title>[Doki] PriPara 50 (1280x720 Hi10P AAC) [441163C4] mkv</title>
<pubDate>Thu, 02 Jul 2015 08:18:29 GMT</pubDate>
<link>http://tracker.anime-index.org/index.php?page=torrents&amp;search=doki&amp;category=0&amp;active=0</link>
<guid isPermaLink="true">http://tracker.anime-index.org/download.php?id=8f7d8bf3d68bb03c88f3fb9b17fd07ca96265085&amp;f=%5BDoki%5D+PriPara+-+50+%281280x720+Hi10P+AAC%29+%5B441163C4%5D.mkv.torrent</guid>
<enclosure url="http://tracker.anime-index.org/download.php?id=8f7d8bf3d68bb03c88f3fb9b17fd07ca96265085&amp;f=%5BDoki%5D+PriPara+-+50+%281280x720+Hi10P+AAC%29+%5B441163C4%5D.mkv.torrent" type="application/x-bittorrent" length="15360"/>
</item>
<item>
<title>[Doki] Hitoribocchi no OO Seikatsu Chapter 10 [52706FCC] zip</title>
<pubDate>Sat, 27 Jun 2015 10:01:02 GMT</pubDate>
<link>http://tracker.anime-index.org/index.php?page=torrents&amp;search=doki&amp;category=0&amp;active=0</link>
<guid isPermaLink="true">http://tracker.anime-index.org/download.php?id=52b245c90ba00b9755c1b49eaad15da8c39ae742&amp;f=%5BDoki%5D+Hitoribocchi+no+OO+Seikatsu+-+Chapter+10+%5B52706FCC%5D.zip.torrent</guid>
<enclosure url="http://tracker.anime-index.org/download.php?id=52b245c90ba00b9755c1b49eaad15da8c39ae742&amp;f=%5BDoki%5D+Hitoribocchi+no+OO+Seikatsu+-+Chapter+10+%5B52706FCC%5D.zip.torrent" type="application/x-bittorrent" length="15360"/>
</item>
<item>
<title>[Doki] PriPara 49 (1280x720 Hi10P AAC) [328C34F3] mkv</title>
<pubDate>Fri, 26 Jun 2015 00:54:59 GMT</pubDate>
<link>http://tracker.anime-index.org/index.php?page=torrents&amp;search=doki&amp;category=0&amp;active=0</link>
<guid isPermaLink="true">http://tracker.anime-index.org/download.php?id=a376fbcd79a40f7ad11eb5af2951a33fb11b8394&amp;f=%5BDoki%5D+PriPara+-+49+%281280x720+Hi10P+AAC%29+%5B328C34F3%5D.mkv.torrent</guid>
<enclosure url="http://tracker.anime-index.org/download.php?id=a376fbcd79a40f7ad11eb5af2951a33fb11b8394&amp;f=%5BDoki%5D+PriPara+-+49+%281280x720+Hi10P+AAC%29+%5B328C34F3%5D.mkv.torrent" type="application/x-bittorrent" length="15360"/>
</item>
<item>
<title>[Doki] PriPara 44 (848x480 h264 AAC) [43DB504A] mkv</title>
<pubDate>Thu, 14 May 2015 01:21:19 GMT</pubDate>
<link>http://tracker.anime-index.org/index.php?page=torrents&amp;search=doki&amp;category=0&amp;active=0</link>
<guid isPermaLink="true">http://tracker.anime-index.org/download.php?id=239196fdeb6427e9c11d69d2853642873481d855&amp;f=%5BDoki%5D+PriPara+-+44+%28848x480+h264+AAC%29+%5B43DB504A%5D.mkv.torrent</guid>
<enclosure url="http://tracker.anime-index.org/download.php?id=239196fdeb6427e9c11d69d2853642873481d855&amp;f=%5BDoki%5D+PriPara+-+44+%28848x480+h264+AAC%29+%5B43DB504A%5D.mkv.torrent" type="application/x-bittorrent" length="15360"/>
</item>
</channel>
</rss>

@ -195,6 +195,7 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests
[TestCase("Wombles/wombles.xml")]
[TestCase("TorrentRss/invalid/Eztv_InvalidSize.xml")]
[TestCase("TorrentRss/invalid/ImmortalSeed_InvalidSize.xml")]
[TestCase("TorrentRss/Doki.xml")]
public void should_detect_feed_without_size(string rssXmlFile)
{
_indexerSettings.AllowZeroSize = true;

@ -396,6 +396,9 @@
<Content Include="Files\emptyfile.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Files\Indexers\TorrentRss\Doki.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Files\Indexers\TorrentRss\invalid\Eztv_InvalidSize.xml">
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

@ -67,7 +67,7 @@ namespace NzbDrone.Core.Indexers
protected virtual Int32? GetSeeders(XElement item)
{
if (ParseSeedersInDescription)
if (ParseSeedersInDescription && item.Element("description") != null)
{
var matchSeeders = ParseSeedersRegex.Match(item.Element("description").Value);
@ -90,7 +90,7 @@ namespace NzbDrone.Core.Indexers
protected virtual Int32? GetPeers(XElement item)
{
if (ParseSeedersInDescription)
if (ParseSeedersInDescription && item.Element("description") != null)
{
var matchPeers = ParsePeersRegex.Match(item.Element("description").Value);

Loading…
Cancel
Save