Added TorrentRss test for ExtraTorrents, no other changes.

pull/4/head
Taloth Saldono 9 years ago
parent e945231ab3
commit bb9a0371c5

@ -0,0 +1,204 @@
<?xml version='1.0' encoding='utf-8' ?>
<rss version='2.0'>
<channel>
<title><![CDATA[RSS ac.me, Category: TV. Torrents type: Most Downloaded. The World's Largest BitTorrent System]]></title>
<link>http://ac.me/</link>
<description>RSS ac.me The World's Largest BitTorrent System. Any torrents for download. Download music, movies, games, software, iPod, anime, porn, adult, books, pictures and other torrents.</description>
<language>en-us</language>
<category>All</category>
<webMaster>extratorr@gmail.com</webMaster>
<image>
<title>ac.me</title>
<url>http://ac.me/images/logo.gif</url>
<link>http://ac.me</link>
</image>
<item>
<title><![CDATA[One.Piece.E334.D ED.720p.HDTV.x264-W4F-={SPARROW}=-]]></title>
<pubDate>Sun, 21 Feb 2016 09:51:54 +0000</pubDate>
<category>TV</category>
<link>http://ac.me/torrent/4722030/One.Piece.E334.D+ED.720p.HDTV.x264-W4F-%3D%7BSPARROW%7D%3D-.html</link>
<enclosure url="http://ac.me/download/4722030/One.Piece.E334.D+ED.720p.HDTV.x264-W4F-%3D%7BSPARROW%7D%3D-.torrent" length="562386947" type="application/x-bittorrent" />
<guid isPermaLink="true">http://ac.me/torrent/4722030/One.Piece.E334.D+ED.720p.HDTV.x264-W4F-%3D%7BSPARROW%7D%3D-.html</guid>
<description>
<![CDATA[ <br />
<div class="bbcode_center" style="text-align:center"><br />
One.Piece.E334.DUBBED.720p.HDTV.x264-W4F-={SPARROW}=-<br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/LwB' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Info.png' alt='Info.png' title='Info.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:green"><br /><br />
one.piece.e334.720p.hdtv.x264-w4f-={SPARROW}=-.mkv<br /><br />
<br /><br />
File type: mkv<br /><br />
Duration: 00:21:14<br /><br />
Video size: 1280x720<br /><br />
Frame rate: 23.98<br /><br />
Bitrate: 3529 kb/s<br /><br />
Video codec: h264<br /><br />
Audio codec: ac3,<br /><br />
Audio type: 5.1(side) </span><br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/UYe' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Screens.png' alt='Screens.png' title='Screens.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:red">Click Image To View Full Size</span><br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/FR1EP'... ]]>
</description>
<size>562386947</size>
<seeders>---</seeders>
<leechers>---</leechers>
<info_hash>c1b7641c4fd5fd4c248a7aee7c2ad0a4267a371c</info_hash>
</item>
<item>
<title><![CDATA[One Piece E334 D ED 720p HDTV x264-W4F]]></title>
<pubDate>Sun, 21 Feb 2016 09:44:21 +0000</pubDate>
<category>TV</category>
<link>http://ac.me/torrent/4722015/One+Piece+E334+D+ED+720p+HDTV+x264-W4F.html</link>
<enclosure url="http://ac.me/download/4722015/One+Piece+E334+D+ED+720p+HDTV+x264-W4F.torrent" length="562392556" type="application/x-bittorrent" />
<guid isPermaLink="true">http://ac.me/torrent/4722015/One+Piece+E334+D+ED+720p+HDTV+x264-W4F.html</guid>
<description>
<![CDATA[ <b></b><br /><br />
<br /><br />
<br /><br />
<br /><br />
<br /><br />
<b>one.piece.e334.720p.hdtv.x264-w4f.mkv</b><br /><br />
<br /><br />
<b>SIZE:</b> 562386319 bytes (536.33 MiB),<br /><br />
<br /><br />
<b>DURATION:</b> 00:21:14,<br /><br />
<br /><br />
<b>AVG-BITRATE:</b> 3531 kb/s<br /><br />
<br /><br />
<b>AUDIO:</b> ac3, 48000 Hz, 5:1 (eng)<br /><br />
<br /><br />
<b>VIDEO:</b> h264, yuv420p, 1280x720, 23.98 fps(r)<br /><br />
Subtitles: eng<br /><br />
<br /><br />
<br /><br />
<br /><br />
<br /><br />
<br /><br />
<b>SCREENS:</b><br /><br />
<a href='http://vivaex.com/img-56c986f4020e8.html' target='_blank' rel='nofollow' ><img src='http://vivaex.com/upload/small/2016/02/21/56c986f4020ae.jpg' alt='56c986f4020ae.jpg' title='56c986f4020ae.jpg' border='0' /></a><br /><br />
<br /><br />
<a href='http://vivaex.com/img-56c986f40a4b0.html' target='_blank' rel='nofollow' ><b>Large Runtime Screen</b></a><br /><br />
<br /><br />
<a href='http://vivaex.com/img-56c986f41229f.html' target='_blank' rel='nofollow' ><b>Large Runtime Screen</b></a> ]]>
</description>
<size>562392556</size>
<seeders>---</seeders>
<leechers>---</leechers>
<info_hash>1a69f565b531594e4f75b0fd4db153dce3e5186e</info_hash>
</item>
<item>
<title><![CDATA[Shadowhunters.S01E06.Of.Men.and.Angels.720p.HDTV.DD5.1.MPEG2-JiTB-={SPARROW}=-]]></title>
<pubDate>Sun, 21 Feb 2016 09:33:00 +0000</pubDate>
<category>TV</category>
<link>http://ac.me/torrent/4721983/Shadowhunters.S01E06.Of.Men.and.Angels.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.html</link>
<enclosure url="http://ac.me/download/4721983/Shadowhunters.S01E06.Of.Men.and.Angels.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.torrent" length="2826689668" type="application/x-bittorrent" />
<guid isPermaLink="true">http://ac.me/torrent/4721983/Shadowhunters.S01E06.Of.Men.and.Angels.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.html</guid>
<description>
<![CDATA[ <br />
<div class="bbcode_center" style="text-align:center"><br />
Shadowhunters.S01E06.Of.Men.and.Angels.720p.HDTV.DD5.1.MPEG2-JiTB-={SPARROW}=-<br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/LwB' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Info.png' alt='Info.png' title='Info.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:green"><br /><br />
Shadowhunters.S01E06.Of.Men.and.Angels.720p.HDTV.DD5.1.MPEG2-JiTB.ts<br /><br />
<br /><br />
File type: ts<br /><br />
Duration: 00:41:17<br /><br />
Video size: 1280x720<br /><br />
Frame rate: 59.94<br /><br />
Bitrate: 9126 kb/s<br /><br />
Video codec: mpeg2video<br /><br />
Audio codec: ac3<br /><br />
Audio type: 5.1(side) </span><br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/UYe' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Screens.png' alt='Screens.png' title='Screens.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:red">Click Image To View Full Size</span><br /><br />
<br /><br />
<a... ]]>
</description>
<size>2826689668</size>
<seeders>---</seeders>
<leechers>---</leechers>
<info_hash>e7b26a23c8cc7e8b2d7da35baaa5933a51586c90</info_hash>
</item>
<item>
<title><![CDATA[Shadowhunters.S01E05.Moo.Shu.to.Go.720p.HDTV.DD5.1.MPEG2-JiTB-={SPARROW}=-]]></title>
<pubDate>Sun, 21 Feb 2016 09:32:51 +0000</pubDate>
<category>TV</category>
<link>http://ac.me/torrent/4721982/Shadowhunters.S01E05.Moo.Shu.to.Go.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.html</link>
<enclosure url="http://ac.me/download/4721982/Shadowhunters.S01E05.Moo.Shu.to.Go.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.torrent" length="2823160720" type="application/x-bittorrent" />
<guid isPermaLink="true">http://ac.me/torrent/4721982/Shadowhunters.S01E05.Moo.Shu.to.Go.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.html</guid>
<description>
<![CDATA[ <br />
<div class="bbcode_center" style="text-align:center"><br />
Shadowhunters.S01E05.Moo.Shu.to.Go.720p.HDTV.DD5.1.MPEG2-JiTB-={SPARROW}=-<br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/LwB' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Info.png' alt='Info.png' title='Info.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:green"><br /><br />
Shadowhunters.S01E05.Moo.Shu.to.Go.720p.HDTV.DD5.1.MPEG2-JiTB.ts<br /><br />
<br /><br />
File type: ts<br /><br />
Duration: 00:41:18<br /><br />
Video size: 1280x720<br /><br />
Frame rate: 59.94<br /><br />
Bitrate: 9112 kb/s<br /><br />
Video codec: mpeg2video<br /><br />
Audio codec: ac3<br /><br />
Audio type: 5.1(side) </span><br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/UYe' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Screens.png' alt='Screens.png' title='Screens.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:red">Click Image To View Full Size</span><br /><br />
<br /><br />
<a... ]]>
</description>
<size>2823160720</size>
<seeders>---</seeders>
<leechers>---</leechers>
<info_hash>77faae6a126854fceb0a9a6fbdc229f68d3e3d03</info_hash>
</item>
<item>
<title><![CDATA[Second.Chance.2016.S01E05.Scratch.That.Glitch.720p.HDTV.DD5.1.MPEG2-JiTB-={SPARROW}=-]]></title>
<pubDate>Sun, 21 Feb 2016 09:32:47 +0000</pubDate>
<category>TV</category>
<link>http://ac.me/torrent/4721981/Second.Chance.2016.S01E05.Scratch.That.Glitch.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.html</link>
<enclosure url="http://ac.me/download/4721981/Second.Chance.2016.S01E05.Scratch.That.Glitch.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.torrent" length="4745525204" type="application/x-bittorrent" />
<guid isPermaLink="true">http://ac.me/torrent/4721981/Second.Chance.2016.S01E05.Scratch.That.Glitch.720p.HDTV.DD5.1.MPEG2-JiTB-%3D%7BSPARROW%7D%3D-.html</guid>
<description>
<![CDATA[ <br />
<div class="bbcode_center" style="text-align:center"><br />
Second.Chance.2016.S01E05.Scratch.That.Glitch.720p.HDTV.DD5.1.MPEG2-JiTB-={SPARROW}=-<br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/LwB' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Info.png' alt='Info.png' title='Info.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:green"><br /><br />
Second.Chance.2016.S01E05.Scratch.That.Glitch.720p.HDTV.DD5.1.MPEG2-JiTB.ts<br /><br />
<br /><br />
File type: ts<br /><br />
Duration: 00:42:01<br /><br />
Video size: 1280x720<br /><br />
Frame rate: 59.94<br /><br />
Bitrate: 15055 kb/s<br /><br />
Video codec: mpeg2video<br /><br />
Audio codec: ac3 ac3<br /><br />
Audio type: 5.1(side) stereo </span><br /><br />
<br /><br />
<a href='http://www.sparrowpics.com/image/UYe' target='_blank' rel='nofollow' ><img src='http://www.sparrowpics.com/images/2015/12/10/Screens.png' alt='Screens.png' title='Screens.png' border='0' /></a><br /><br />
<br /><br />
<span style="color:red">Click Image To View Full... ]]>
</description>
<size>4745525204</size>
<seeders>---</seeders>
<leechers>---</leechers>
<info_hash>0c341bbdadbc3c985304eb13893cc0731121e333</info_hash>
</item>
</channel>
</rss>

@ -151,5 +151,31 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests
torrentInfo.Peers.Should().NotHaveValue(); torrentInfo.Peers.Should().NotHaveValue();
torrentInfo.Seeders.Should().NotHaveValue(); torrentInfo.Seeders.Should().NotHaveValue();
} }
[Test]
public void should_parse_recent_feed_from_ExtraTorrents()
{
GivenRecentFeedResponse("TorrentRss/ExtraTorrents.xml");
var releases = Subject.FetchRecent();
releases.Should().HaveCount(5);
releases.First().Should().BeOfType<TorrentInfo>();
var torrentInfo = releases.First() as TorrentInfo;
torrentInfo.Title.Should().Be("One.Piece.E334.D ED.720p.HDTV.x264-W4F-={SPARROW}=-");
torrentInfo.DownloadProtocol.Should().Be(DownloadProtocol.Torrent);
torrentInfo.DownloadUrl.Should().Be("http://ac.me/download/4722030/One.Piece.E334.D+ED.720p.HDTV.x264-W4F-%3D%7BSPARROW%7D%3D-.torrent");
torrentInfo.InfoUrl.Should().BeNullOrEmpty();
torrentInfo.CommentUrl.Should().BeNullOrEmpty();
torrentInfo.Indexer.Should().Be(Subject.Definition.Name);
torrentInfo.PublishDate.Should().Be(DateTime.Parse("Sun, 21 Feb 2016 09:51:54 +0000").ToUniversalTime());
torrentInfo.Size.Should().Be(562386947);
torrentInfo.InfoHash.Should().BeNull();
torrentInfo.MagnetUrl.Should().BeNull();
torrentInfo.Peers.Should().NotHaveValue();
torrentInfo.Seeders.Should().NotHaveValue();
}
} }
} }

@ -163,6 +163,26 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests
}); });
} }
[Test]
public void should_detect_rss_settings_for_ExtraTorrents()
{
_indexerSettings.AllowZeroSize = true;
GivenRecentFeedResponse("TorrentRss/ExtraTorrents.xml");
var settings = Subject.Detect(_indexerSettings);
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
{
UseEZTVFormat = false,
UseEnclosureUrl = true,
UseEnclosureLength = true,
ParseSizeInDescription = false,
ParseSeedersInDescription = false,
SizeElementName = null
});
}
[Test] [Test]
[Ignore("Cannot reliably reject unparseable titles")] [Ignore("Cannot reliably reject unparseable titles")]
public void should_reject_rss_settings_for_AwesomeHD() public void should_reject_rss_settings_for_AwesomeHD()

@ -417,6 +417,9 @@
<Content Include="Files\Indexers\relative_urls.xml"> <Content Include="Files\Indexers\relative_urls.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Files\Indexers\TorrentRss\ExtraTorrents.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Files\Indexers\TorrentRss\Doki.xml"> <Content Include="Files\Indexers\TorrentRss\Doki.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>

Loading…
Cancel
Save