From 2f4ccff0a2cf754ae81eb0a3a9205a6404116fce Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 12 May 2013 22:52:43 -0700 Subject: [PATCH] removed nzbindex --- .../IndexerTests/IndexerServiceFixture.cs | 2 - NzbDrone.Core/Indexers/NzbIndex/NzbIndex.cs | 77 ------------------- .../Indexers/NzbIndex/NzbIndexParser.cs | 44 ----------- NzbDrone.Core/NzbDrone.Core.csproj | 2 - 4 files changed, 125 deletions(-) delete mode 100644 NzbDrone.Core/Indexers/NzbIndex/NzbIndex.cs delete mode 100644 NzbDrone.Core/Indexers/NzbIndex/NzbIndexParser.cs diff --git a/NzbDrone.Core.Test/IndexerTests/IndexerServiceFixture.cs b/NzbDrone.Core.Test/IndexerTests/IndexerServiceFixture.cs index 435db7f75..369bf6b1a 100644 --- a/NzbDrone.Core.Test/IndexerTests/IndexerServiceFixture.cs +++ b/NzbDrone.Core.Test/IndexerTests/IndexerServiceFixture.cs @@ -7,7 +7,6 @@ using NUnit.Framework; using NzbDrone.Core.Indexers; using NzbDrone.Core.Indexers.Newznab; using NzbDrone.Core.Indexers.NzbClub; -using NzbDrone.Core.Indexers.NzbIndex; using NzbDrone.Core.Indexers.NzbsRUs; using NzbDrone.Core.Indexers.Omgwtfnzbs; using NzbDrone.Core.Indexers.Wombles; @@ -28,7 +27,6 @@ namespace NzbDrone.Core.Test.IndexerTests _indexers.Add(new Newznab()); _indexers.Add(new Nzbsrus()); _indexers.Add(new NzbClub()); - _indexers.Add(new NzbIndex()); _indexers.Add(new Omgwtfnzbs()); _indexers.Add(new Wombles()); diff --git a/NzbDrone.Core/Indexers/NzbIndex/NzbIndex.cs b/NzbDrone.Core/Indexers/NzbIndex/NzbIndex.cs deleted file mode 100644 index 04af23b28..000000000 --- a/NzbDrone.Core/Indexers/NzbIndex/NzbIndex.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace NzbDrone.Core.Indexers.NzbIndex -{ - public class NzbIndex : IndexerBase - { - public override IEnumerable RecentFeed - { - get - { - return new[] - { - String.Format("http://www.nzbindex.nl/rss/alt.binaries.teevee/?sort=agedesc&minsize=100&complete=1&max=50&more=1&q=%23a.b.teevee"), - String.Format("http://www.nzbindex.nl/rss/alt.binaries.hdtv/?sort=agedesc&minsize=100&complete=1&max=50&more=1&q=") - }; - } - } - - - public override string Name - { - get { return "NzbIndex"; } - } - - - - - public override IEnumerable GetEpisodeSearchUrls(string seriesTitle, int seasonNumber, int episodeNumber) - { - var searchUrls = new List(); - - foreach (var url in RecentFeed) - { - searchUrls.Add(String.Format("{0}+{1}+s{2:00}e{3:00}", url, seriesTitle, seasonNumber, episodeNumber)); - } - - return searchUrls; - } - - public override IEnumerable GetSeasonSearchUrls(string seriesTitle, int seasonNumber) - { - var searchUrls = new List(); - - foreach (var url in RecentFeed) - { - searchUrls.Add(String.Format("{0}+{1}+s{2:00}", url, seriesTitle, seasonNumber)); - } - - return searchUrls; - } - - public override IEnumerable GetDailyEpisodeSearchUrls(string seriesTitle, DateTime date) - { - var searchUrls = new List(); - - foreach (var url in RecentFeed) - { - searchUrls.Add(String.Format("{0}+{1}+{2:yyyy MM dd}", url, seriesTitle, date)); - } - - return searchUrls; - } - - public override IEnumerable GetPartialSeasonSearchUrls(string seriesTitle, int seasonNumber, int episodeWildcard) - { - var searchUrls = new List(); - - foreach (var url in RecentFeed) - { - searchUrls.Add(String.Format("{0}+{1}+S{2:00}E{3}", url, seriesTitle, seasonNumber, episodeWildcard)); - } - - return searchUrls; - } - } -} \ No newline at end of file diff --git a/NzbDrone.Core/Indexers/NzbIndex/NzbIndexParser.cs b/NzbDrone.Core/Indexers/NzbIndex/NzbIndexParser.cs deleted file mode 100644 index d537251bb..000000000 --- a/NzbDrone.Core/Indexers/NzbIndex/NzbIndexParser.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.ServiceModel.Syndication; -using System.Text.RegularExpressions; -using NzbDrone.Core.Model; -using NzbDrone.Core.Parser; -using NzbDrone.Core.Parser.Model; - -namespace NzbDrone.Core.Indexers.NzbIndex -{ - public class NzbIndexParser : BasicRssParser - { - - protected override string GetNzbUrl(SyndicationItem item) - { - return item.Links[1].Uri.ToString(); - } - - protected override string GetNzbInfoUrl(SyndicationItem item) - { - return item.Links[0].Uri.ToString(); - } - - protected override ReportInfo PostProcessor(SyndicationItem item, ReportInfo currentResult) - { - if (currentResult != null) - { - var sizeString = Regex.Match(item.Summary.Text, @"\d+\.\d{1,2}\s\w{2}", RegexOptions.IgnoreCase | RegexOptions.Compiled).Value; - currentResult.Size = GetReportSize(sizeString); - } - - return currentResult; - } - - protected override string GetTitle(SyndicationItem syndicationItem) - { - var title = ParseHeader(syndicationItem.Title.Text); - - if (String.IsNullOrWhiteSpace(title)) - return syndicationItem.Title.Text; - - return title; - } - } -} \ No newline at end of file diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 3483e533a..6332d24e9 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -275,8 +275,6 @@ - -