Changed: Cleanup indexer files, Remove fanzub (#305)

pull/6/head
Qstick 7 years ago committed by GitHub
parent 57fc26916a
commit f6a1f5142a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="0.91">
<channel>
<ttl>10</ttl>
<title>BitMeTV.ORG</title>
<link>http://www.bitmetv.org</link>
<description>This is a private - by registration only - website. You can help keep it alive by donating: http://www.bitmetv.org/donate.php</description>
<language>en-usde</language>
<copyright>Copyright © 2004 - 2007 BitMeTV.ORG</copyright>
<webMaster>noreply@bitmetv.org</webMaster>
<image>
<title>BitMeTV.ORG</title>
<url>http://www.bitmetv.org/favicon.ico</url>
<link>http://www.bitmetv.org</link>
<width>16</width>
<height>16</height>
<description>This is a private - by registration only - website. You can help keep it alive by donating: http://www.bitmetv.org/donate.php</description>
</image>
<item>
<title>Total.Divas.S02E08.HDTV.x264-CRiMSON</title>
<link>http://www.bitmetv.org/download.php/12/Total.Divas.S02E08.HDTV.x264-CRiMSON.torrent</link>
<pubDate>Tue, 13 May 2014 17:04:29 -0000</pubDate>
<description>
Category: (Reality TV - Un-scripted)
Size: 376.71 MB
</description>
</item>
<item>
<title>Aqua.Teen.Hunger.Force.S10.INTERNAL.HDTV.x264-BitMeTV</title>
<link>http://www.bitmetv.org/download.php/34/Aqua.Teen.Hunger.Force.S10.INTERNAL.HDTV.x264-BitMeTV.torrent</link>
<pubDate>Tue, 13 May 2014 17:03:12 -0000</pubDate>
<description>
Category: (Adult Swim)
Size: 725.46 MB
</description>
</item>
<item>
<title>Antiques.Roadshow.US.S18E16.720p.HDTV.x264-BAJSKORV</title>
<link>http://www.bitmetv.org/download.php/56/Antiques.Roadshow.US.S18E16.720p.HDTV.x264-BAJSKORV.torrent</link>
<pubDate>Tue, 13 May 2014 16:47:05 -0000</pubDate>
<description>
Category: (Reality TV - Un-scripted)
Size: 960.15 MB
</description>
</item>
<item>
<title>Seth.Meyers.2014.05.12.Chris.O.Dowd-Emma.Roberts.HDTV.x264-CROOKS</title>
<link>http://www.bitmetv.org/download.php/78/Seth.Meyers.2014.05.12.Chris.O.Dowd-Emma.Roberts.HDTV.x264-CROOKS.torrent</link>
<pubDate>Tue, 13 May 2014 16:01:21 -0000</pubDate>
<description>
Category: Seth Meyers
Size: 301.31 MB
</description>
</item>
<item>
<title>The.Mole.Australia.Season.4</title>
<link>http://www.bitmetv.org/download.php/910/The%20Mole%20Australia%20-%20Season%204.torrent</link>
<pubDate>Tue, 13 May 2014 15:52:54 -0000</pubDate>
<description>
Category: (Reality TV - Competitive)
Size: 2.13 GB
</description>
</item>
</channel>
</rss>

@ -1,61 +0,0 @@
{
"id":"9787693d",
"result":{
"torrents":{
"123":{
"GroupName":"2014.09.15",
"GroupID":"237457",
"TorrentID":"123",
"SeriesID":"1034",
"Series":"Jimmy Kimmel Live",
"SeriesBanner":"https:\/\/cdn2.broadcasthe.net\/tvdb\/banners\/graphical\/71998-g.jpg",
"SeriesPoster":"https:\/\/cdn2.broadcasthe.net\/tvdb\/banners\/posters\/71998-3.jpg",
"YoutubeTrailer":"http:\/\/www.youtube.com\/v\/w3NwB9PLxss",
"Category":"Episode",
"Snatched":"40",
"Seeders":"40",
"Leechers":"9",
"Source":"HDTV",
"Container":"MP4",
"Codec":"x264",
"Resolution":"SD",
"Origin":"Scene",
"ReleaseName":"Jimmy.Kimmel.2014.09.15.Jane.Fonda.HDTV.x264-aAF",
"Size":"505099926",
"Time":"1410902133",
"TvdbID":"71998",
"TvrageID":"4055",
"ImdbID":"0320037",
"InfoHash":"123",
"DownloadURL":"https:\/\/broadcasthe.net\/torrents.php?action=download&id=123&authkey=123&torrent_pass=123"
},
"1234":{
"GroupName":"S01E02",
"GroupID":"237456",
"TorrentID":"1234",
"SeriesID":"45853",
"Series":"Mammon",
"SeriesBanner":"https:\/\/cdn2.broadcasthe.net\/tvdb\/banners\/text\/274366.jpg",
"SeriesPoster":"\/\/cdn2.broadcasthe.net\/tvdb\/banners\/posters\/274366-2.jpg",
"YoutubeTrailer":"http:\/\/www.youtube.com\/v\/1VVbJecvHr8",
"Category":"Episode",
"Snatched":"0",
"Seeders":"1",
"Leechers":"23",
"Source":"HDTV",
"Container":"TS",
"Codec":"h.264",
"Resolution":"1080i",
"Origin":"Internal",
"ReleaseName":"Mammon.S01E02.1080i.HDTV.H.264-Irishman",
"Size":"4021238596",
"Time":"1410901918",
"TvdbID":"274366",
"TvrageID":"38472",
"ImdbID":"2377081",
"InfoHash":"1234",
"DownloadURL":"https:\/\/broadcasthe.net\/torrents.php?action=download&id=1234&authkey=1234&torrent_pass=1234"
}},
"results":"117927"
}
}

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Anime :: Fanzub</title>
<link>http://www.fanzub.com/</link>
<description>A Usenet Search Engine for Japanese Media</description>
<language>en-us</language>
<atom:link href="http://fanzub.com/rss?cat=anime" rel="self" type="application/rss+xml" />
<item>
<title>[Vivid] Hanayamata - 10 [A33D6606]</title>
<link>http://fanzub.com/nzb/296464</link>
<description>&lt;i&gt;Age&lt;/i&gt;: 0 days&lt;br /&gt;&lt;i&gt;Size&lt;/i&gt;: 530.48 MiB&lt;br /&gt;&lt;i&gt;Parts&lt;/i&gt;: 100%&lt;br /&gt;&lt;i&gt;Files&lt;/i&gt;: 1 other, 8 par2&lt;br /&gt;&lt;i&gt;Subject&lt;/i&gt;: [9/9] [Vivid] Hanayamata - 10 [A33D6606].vol63+27.par2 (1/28)</description>
<category>Anime</category>
<pubDate>Sat, 13 Sep 2014 12:56:53 +0000</pubDate>
<enclosure url="http://fanzub.com/nzb/296464/Vivid%20Hanayamata%20-%2010.nzb" length="556246858" type="application/x-nzb" />
<guid isPermaLink="false">http://fanzub.com/nzb/296464</guid>
</item>
<item>
<title>(Sniper2000) - Pokemon HD - XY 37</title>
<link>http://fanzub.com/nzb/296456</link>
<description>&lt;i&gt;Age&lt;/i&gt;: 0 days&lt;br /&gt;&lt;i&gt;Size&lt;/i&gt;: 2.79 GiB&lt;br /&gt;&lt;i&gt;Parts&lt;/i&gt;: 100%&lt;br /&gt;&lt;i&gt;Files&lt;/i&gt;: 1 nzb, 1 other, 77 par2, 30 rar&lt;br /&gt;&lt;i&gt;Subject&lt;/i&gt;: (Sniper2000) [108/108] - &quot;XY 37.vol183+176.PAR2&quot;Pokemon HD (1/272)</description>
<category>Anime</category>
<pubDate>Sat, 13 Sep 2014 12:38:03 +0000</pubDate>
<enclosure url="http://fanzub.com/nzb/296456/Sniper2000%20-%20Pokemon%20HD%20-%20XY%2037.nzb" length="2995093986" type="application/x-nzb" />
<guid isPermaLink="false">http://fanzub.com/nzb/296456</guid>
</item>
<item>
<title>[HorribleSubs] Kindaichi Case Files R - 23 [480p].mkv</title>
<link>http://fanzub.com/nzb/296472</link>
<description>&lt;i&gt;Age&lt;/i&gt;: 0 days&lt;br /&gt;&lt;i&gt;Size&lt;/i&gt;: 153.87 MiB&lt;br /&gt;&lt;i&gt;Parts&lt;/i&gt;: 100%&lt;br /&gt;&lt;i&gt;Files&lt;/i&gt;: 7 par2, 6 split&lt;br /&gt;&lt;i&gt;Subject&lt;/i&gt;: [HorribleSubs] Kindaichi Case Files R - 23 [480p] [13/13] - &quot;[HorribleSubs] Kindaichi Case Files R - 23 [480p].mkv.vol31+06.par2&quot; yEnc (1/7)</description>
<category>Anime</category>
<pubDate>Sat, 13 Sep 2014 11:51:59 +0000</pubDate>
<enclosure url="http://fanzub.com/nzb/296472/HorribleSubs%20Kindaichi%20Case%20Files%20R%20-%2023%20480p.nzb" length="161341092" type="application/x-nzb" />
<guid isPermaLink="false">http://fanzub.com/nzb/296472</guid>
</item>
</channel>
</rss>

@ -1,57 +0,0 @@
{
"status": 0,
"data": [
{
"id": 257142,
"hash": "EABC50AEF9F53CEDED84ADF14144D3368E586F3A",
"leechers": 1,
"seeders": 46,
"name": "Supernatural S10E17 1080p WEB-DL DD5.1 H.264-ECI",
"times_completed": 49,
"size": 1718009717,
"utadded": 1428179446,
"added": "2015-04-04T20:30:46+0000",
"comments": 0,
"numfiles": 1,
"filename": "Supernatural.S10E17.1080p.WEB-DL.DD5.1.H.264-ECI.torrent",
"freeleech": "no",
"type_category": 2,
"type_codec": 1,
"type_medium": 6,
"type_origin": 0,
"username": "abc",
"owner": 1107944,
"tvdb": {
"id": 78901,
"season": 10,
"episode": 17
}
},
{
"id": 257140,
"hash": "BE3BA5396B9A30544353B55FDD89EDE46C8FB72A",
"leechers": 0,
"seeders": 18,
"name": "Scandal S04E18 1080p WEB-DL DD5.1 H.264-ECI",
"times_completed": 19,
"size": 1789106197,
"utadded": 1428179128,
"added": "2015-04-04T20:25:28+0000",
"comments": 0,
"numfiles": 1,
"filename": "Scandal.2012.S04E18.1080p.WEB-DL.DD5.1.H.264-ECI.torrent",
"freeleech": "no",
"type_category": 2,
"type_codec": 1,
"type_medium": 6,
"type_origin": 0,
"username": "abc",
"owner": 1107944,
"tvdb": {
"id": 248841,
"season": 4,
"episode": 18
}
}
]
}

@ -1,57 +0,0 @@
{
"status": 0,
"data": [
{
"id": "257142",
"hash": "EABC50AEF9F53CEDED84ADF14144D3368E586F3A",
"leechers": 1,
"seeders": 46,
"name": "Supernatural S10E17 1080p WEB-DL DD5.1 H.264-ECI",
"times_completed": 49,
"size": 1718009717,
"utadded": 1428179446,
"added": "2015-04-04T20:30:46+0000",
"comments": 0,
"numfiles": 1,
"filename": "Supernatural.S10E17.1080p.WEB-DL.DD5.1.H.264-ECI.torrent",
"freeleech": "no",
"type_category": 2,
"type_codec": 1,
"type_medium": 6,
"type_origin": 0,
"username": "abc",
"owner": 1107944,
"tvdb": {
"id": 78901,
"season": 10,
"episode": 17
}
},
{
"id": "257140",
"hash": "BE3BA5396B9A30544353B55FDD89EDE46C8FB72A",
"leechers": 0,
"seeders": 18,
"name": "Scandal S04E18 1080p WEB-DL DD5.1 H.264-ECI",
"times_completed": 19,
"size": 1789106197,
"utadded": 1428179128,
"added": "2015-04-04T20:25:28+0000",
"comments": 0,
"numfiles": 1,
"filename": "Scandal.2012.S04E18.1080p.WEB-DL.DD5.1.H.264-ECI.torrent",
"freeleech": "no",
"type_category": 2,
"type_codec": 1,
"type_medium": 6,
"type_origin": 0,
"username": "abc",
"owner": 1107944,
"tvdb": {
"id": 248841,
"season": 4,
"episode": 18
}
}
]
}

@ -1,51 +0,0 @@
using System;
using System.Linq;
using FluentAssertions;
using Moq;
using NUnit.Framework;
using NzbDrone.Common.Http;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Indexers.Fanzub;
using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.IndexerTests.FanzubTests
{
[TestFixture]
public class FanzubFixture : CoreTest<Fanzub>
{
[SetUp]
public void Setup()
{
Subject.Definition = new IndexerDefinition()
{
Name = "Fanzub",
Settings = new FanzubSettings()
};
}
[Test]
public void should_parse_recent_feed_from_fanzub()
{
var recentFeed = ReadAllText(@"Files/Indexers/Fanzub/fanzub.xml");
Mocker.GetMock<IHttpClient>()
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.GET)))
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), recentFeed));
var releases = Subject.FetchRecent();
releases.Should().HaveCount(3);
var releaseInfo = releases.First();
releaseInfo.Title.Should().Be("[Vivid] Hanayamata - 10 [A33D6606]");
releaseInfo.DownloadProtocol.Should().Be(DownloadProtocol.Usenet);
releaseInfo.DownloadUrl.Should().Be("http://fanzub.com/nzb/296464/Vivid%20Hanayamata%20-%2010.nzb");
releaseInfo.InfoUrl.Should().BeNullOrEmpty();
releaseInfo.CommentUrl.Should().BeNullOrEmpty();
releaseInfo.Indexer.Should().Be(Subject.Definition.Name);
releaseInfo.PublishDate.Should().Be(DateTime.Parse("2014/09/13 12:56:53"));
releaseInfo.Size.Should().Be(556246858);
}
}
}

@ -258,7 +258,6 @@
<Compile Include="IndexerTests\NewznabTests\NewznabFixture.cs" />
<Compile Include="IndexerTests\NewznabTests\NewznabRequestGeneratorFixture.cs" />
<Compile Include="IndexerTests\NewznabTests\NewznabSettingFixture.cs" />
<Compile Include="IndexerTests\FanzubTests\FanzubFixture.cs" />
<Compile Include="IndexerTests\OmgwtfnzbsTests\OmgwtfnzbsFixture.cs" />
<Compile Include="IndexerTests\TestIndexer.cs" />
<Compile Include="IndexerTests\TestIndexerSettings.cs" />
@ -441,15 +440,6 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="License.txt" />
<None Include="Files\Indexers\BroadcastheNet\RecentFeed.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Files\Indexers\HdBits\RecentFeedLongIDs.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Files\Indexers\HdBits\RecentFeedStringIDs.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Content Include="Files\html_image.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -475,9 +465,6 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Files\Indexers\Fanzub\fanzub.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Files\Indexers\TorrentRss\Ezrss.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
@ -552,9 +539,6 @@
<Content Include="Files\Indexers\Torznab\torznab_tpb.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Files\Indexers\BitMeTv\BitMeTv.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Files\Indexers\IPTorrents\IPTorrents.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

@ -0,0 +1,14 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(15)]
public class remove_fanzub : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Execute.Sql("DELETE FROM Indexers WHERE Implementation = 'Fanzub';");
}
}
}

@ -1,30 +0,0 @@
using NLog;
using NzbDrone.Common.Http;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Parser;
namespace NzbDrone.Core.Indexers.Fanzub
{
public class Fanzub : HttpIndexerBase<FanzubSettings>
{
public override string Name => "Fanzub";
public override DownloadProtocol Protocol => DownloadProtocol.Usenet;
public Fanzub(IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger)
: base(httpClient, indexerStatusService, configService, parsingService, logger)
{
}
public override IIndexerRequestGenerator GetRequestGenerator()
{
return new FanzubRequestGenerator() { Settings = Settings };
}
public override IParseIndexerResponse GetParser()
{
return new RssParser() { UseEnclosureUrl = true, UseEnclosureLength = true };
}
}
}

@ -1,67 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using NzbDrone.Common.Extensions;
using NzbDrone.Common.Http;
using NzbDrone.Core.IndexerSearch.Definitions;
namespace NzbDrone.Core.Indexers.Fanzub
{
public class FanzubRequestGenerator : IIndexerRequestGenerator
{
private static readonly Regex RemoveCharactersRegex = new Regex(@"[!?`]", RegexOptions.Compiled);
public FanzubSettings Settings { get; set; }
public int PageSize { get; set; }
public FanzubRequestGenerator()
{
PageSize = 100;
}
public virtual IndexerPageableRequestChain GetRecentRequests()
{
var pageableRequests = new IndexerPageableRequestChain();
pageableRequests.Add(GetPagedRequests(null));
return pageableRequests;
}
public virtual IndexerPageableRequestChain GetSearchRequests(AlbumSearchCriteria searchCriteria)
{
throw new System.NotImplementedException();
}
public virtual IndexerPageableRequestChain GetSearchRequests(ArtistSearchCriteria searchCriteria)
{
throw new System.NotImplementedException();
}
private IEnumerable<IndexerRequest> GetPagedRequests(string query)
{
var url = new StringBuilder();
url.AppendFormat("{0}?cat=anime&max={1}", Settings.BaseUrl, PageSize);
if (query.IsNotNullOrWhiteSpace())
{
url.AppendFormat("&q={0}", query);
}
yield return new IndexerRequest(url.ToString(), HttpAccept.Rss);
}
private IEnumerable<string> GetTitleSearchStrings(string title, int absoluteEpisodeNumber)
{
var formats = new[] { "{0}%20{1:00}", "{0}%20-%20{1:00}" };
return formats.Select(s => "\"" + string.Format(s, CleanTitle(title), absoluteEpisodeNumber) + "\"");
}
private string CleanTitle(string title)
{
return RemoveCharactersRegex.Replace(title, "");
}
}
}

@ -1,33 +0,0 @@
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.Indexers.Fanzub
{
public class FanzubSettingsValidator : AbstractValidator<FanzubSettings>
{
public FanzubSettingsValidator()
{
RuleFor(c => c.BaseUrl).ValidRootUrl();
}
}
public class FanzubSettings : IIndexerSettings
{
private static readonly FanzubSettingsValidator Validator = new FanzubSettingsValidator();
public FanzubSettings()
{
BaseUrl = "http://fanzub.com/rss/";
}
[FieldDefinition(0, Label = "Rss URL", HelpText = "Enter to URL to an Fanzub compatible RSS feed")]
public string BaseUrl { get; set; }
public NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}
}
}

@ -35,14 +35,6 @@ namespace NzbDrone.Core.Indexers.Torznab
return new TorznabRssParser();
}
public override IEnumerable<ProviderDefinition> DefaultDefinitions
{
get
{
yield return GetDefinition("HD4Free.xyz", GetSettings("http://hd4free.xyz"));
}
}
public Torznab(INewznabCapabilitiesProvider capabilitiesProvider, IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger)
: base(httpClient, indexerStatusService, configService, parsingService, logger)
{

@ -185,6 +185,7 @@
<Compile Include="Datastore\Migration\010_album_releases_fix.cs" />
<Compile Include="Datastore\Migration\011_import_lists.cs" />
<Compile Include="Datastore\Migration\012_add_release_status.cs" />
<Compile Include="Datastore\Migration\015_remove_fanzub.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
<Compile Include="Datastore\Migration\Framework\MigrationDbFactory.cs" />
@ -586,9 +587,6 @@
<Compile Include="Indexers\Exceptions\RequestLimitReachedException.cs" />
<Compile Include="Indexers\Exceptions\UnsupportedFeedException.cs" />
<Compile Include="Indexers\EzrssTorrentRssParser.cs" />
<Compile Include="Indexers\Fanzub\Fanzub.cs" />
<Compile Include="Indexers\Fanzub\FanzubRequestGenerator.cs" />
<Compile Include="Indexers\Fanzub\FanzubSettings.cs" />
<Compile Include="Indexers\FetchAndParseRssService.cs" />
<Compile Include="Indexers\IIndexer.cs" />
<Compile Include="Indexers\IIndexerRequestGenerator.cs" />

Loading…
Cancel
Save