From c8969b77fe2e144c0c0232f820e73ea4804e2e62 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 2 Dec 2012 19:47:28 -0800 Subject: [PATCH] More newzbin cleanup --- .../Files/RSS/newbin_none_english.xml | 577 ------------------ NzbDrone.Core.Test/IndexerTests.cs | 1 - .../SabProviderTests/SabProviderFixture.cs | 15 - .../Providers/DownloadClients/SabProvider.cs | 19 +- NzbDrone.Web/Views/Settings/Indexers.cshtml | 6 - 5 files changed, 1 insertion(+), 617 deletions(-) delete mode 100644 NzbDrone.Core.Test/Files/RSS/newbin_none_english.xml diff --git a/NzbDrone.Core.Test/Files/RSS/newbin_none_english.xml b/NzbDrone.Core.Test/Files/RSS/newbin_none_english.xml deleted file mode 100644 index 01f0ca10b..000000000 --- a/NzbDrone.Core.Test/Files/RSS/newbin_none_english.xml +++ /dev/null @@ -1,577 +0,0 @@ - - - - www.newzbin.com (reports) - http://www.newzbin.com/search/query/?q=plain+sight+1x11&area=-1&fpn=p&searchaction=Go&btnG_x=0&btnG_y=0&btnG=Go&areadone=-1 - Newzbin Reports Feed - Sun, 10 Jul 2011 19:26:13 GMT - 42 - www.newzbin.com - Usenet Search - Copyright (c) 2002 - 2007 Newzbin Limited. All Rights Reserved. - - http://www.newzbin.com/m/i/logo/newzbinv3.png - http://www.newzbin.com/search/query/?q=plain+sight+1x11&area=-1&fpn=p&searchaction=Go&btnG_x=0&btnG_y=0&btnG=Go&areadone=-1 - www.newzbin.com - Visit Newzbin.com - The Ultimate In Usenet Indexing - - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/6168058/ - http://www.newzbin.com/browse/post/6168058/ - http://www.newzbin.com/browse/post/6168058/#CommentsPH - - -
  • - ID: 6168058 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 401.0MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - DVD | Video Format - XviD | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - German -
  • -
  • Groups: alt.binaries.tv.deutsch, alt.binaries.ath, alt.binaries.ghosts
  • -
  • Poster: GhostUp10Special <Besuche.uns@ghost-of-usenet.org>
  • -
  • PostDate: Thursday 05 May 2011, 04:43PM PDT
  • - ]]> -
    - 6168058 - TV - - DVD - XviD - Action/Adv - Comedy - Crime - Drama - German - - - alt.binaries.tv.deutsch - alt.binaries.ath - alt.binaries.ghosts - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 393774229 - deli-inplainsightxvid-s01e11.nfo - http://www.newzbin.com/nfo/view/txt/393774229/ - - http://www.newzbin.com/browse/post/6168058/nzb/ - GhostUp10Special <Besuche.uns@ghost-of-usenet.org> - 420447818 - Thu, 05 May 2011 23:43:45 GMT - - 4 - 0 - - - Fri, 17 Jun 2011 05:09:03 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/6161398/ - http://www.newzbin.com/browse/post/6161398/ - http://www.newzbin.com/browse/post/6161398/#CommentsPH - - -
  • - ID: 6161398 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 409.7MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - DVD | Video Format - XviD | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - Italian -
  • -
  • Groups: alt.binaries.tv
  • -
  • Poster: Bombvis (Bombvis)
  • -
  • PostDate: Tuesday 06 Apr 2010, 04:52AM PDT
  • - ]]> -
    - 6161398 - TV - - DVD - XviD - Action/Adv - Comedy - Crime - Drama - English - - - alt.binaries.tv - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 300006301 - tpz-inplainsight111.nfo - http://www.newzbin.com/nfo/view/txt/300006301/ - - http://www.newzbin.com/browse/post/6161398/nzb/ - Bombvis (Bombvis) - 429553520 - Tue, 06 Apr 2010 11:52:26 GMT - - 5 - 0 - - - Mon, 13 Jun 2011 08:17:25 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/6108215/ - http://www.newzbin.com/browse/post/6108215/ - http://www.newzbin.com/browse/post/6108215/#CommentsPH - - -
  • - ID: 6108215 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 403.2MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - DVD | Video Format - XviD | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - German, English -
  • -
  • Groups: alt.binaries.mom, alt.binaries.tv.german
  • -
  • Poster: Zzzzzzz <Zzzzzzz@Zzzzzzz.Zz>
  • -
  • PostDate: Thursday 05 May 2011, 06:18AM PDT
  • - ]]> -
    - 6108215 - TV - - DVD - XviD - Action/Adv - Comedy - Crime - Drama - German - - - alt.binaries.mom - alt.binaries.tv.german - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 393598550 - In.Plain.Sight.S01E11.Die.falsche.Schwester.German.WS.DVDRip.XviD-DELiCiOUS__www.realmom.info__.nfo - http://www.newzbin.com/nfo/view/txt/393598550/ - - http://www.newzbin.com/browse/post/6108215/nzb/ - Zzzzzzz <Zzzzzzz@Zzzzzzz.Zz> - 422762521 - Thu, 05 May 2011 13:18:03 GMT - - 4 - 0 - - - Mon, 09 May 2011 07:35:25 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/5955780/ - http://www.newzbin.com/browse/post/5955780/ - http://www.newzbin.com/browse/post/5955780/#CommentsPH - - -
  • - ID: 5955780 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 1,321.7MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - TV Cap, HDTV | Video Format - x264, 720p | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - French -
  • -
  • Groups: alt.binaries.multimedia, alt.binaries.teevee
  • -
  • Poster: nothing@here.com <nothing here>
  • -
  • PostDate: Sunday 13 Feb 2011, 01:07PM PDT
  • - ]]> -
    - 5955780 - TV - - TV Cap - HDTV - x264 - 720p - Action/Adv - Comedy - Crime - Drama - French - - - alt.binaries.multimedia - alt.binaries.teevee - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 368038897 - in.plain.sight.s01e11.french.720p.hdtv.x264-hybris.nfo - http://www.newzbin.com/nfo/view/txt/368038897/ - - http://www.newzbin.com/browse/post/5955780/nzb/ - nothing@here.com <nothing here> - 1385894096 - Sun, 13 Feb 2011 21:07:51 GMT - - 8 - 0 - - - Sun, 13 Feb 2011 21:44:05 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/5921224/ - http://www.newzbin.com/browse/post/5921224/ - http://www.newzbin.com/browse/post/5921224/#CommentsPH - - -
  • - ID: 5921224 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 360.2MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - DVD | Video Format - XviD | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - German -
  • -
  • Groups: alt.binaries.cores
  • -
  • Poster: 0
  • -
  • PostDate: Tuesday 12 Jan 2010, 05:29PM PDT
  • - ]]> -
    - 5921224 - TV - - DVD - XviD - Action/Adv - Comedy - Crime - Drama - German - - - alt.binaries.cores - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 0 - - - - http://www.newzbin.com/browse/post/5921224/nzb/ - 0 - 377678229 - Wed, 13 Jan 2010 01:29:08 GMT - - 5 - 0 - - - Fri, 21 Jan 2011 00:49:58 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/5913200/ - http://www.newzbin.com/browse/post/5913200/ - http://www.newzbin.com/browse/post/5913200/#CommentsPH - - -
  • - ID: 5913200 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 369.4MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - DVD | Video Format - XviD | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - German -
  • -
  • Groups: alt.binaries.cores, alt.binaries.tv.deutsch, alt.binaries.ath
  • -
  • Poster: poster17@illuminatenboard.org <JBinUp@JBinUp>
  • -
  • PostDate: Friday 15 Jan 2010, 05:42PM PDT
  • - ]]> -
    - 5913200 - TV - - DVD - XviD - Action/Adv - Comedy - Crime - Drama - German - - - alt.binaries.cores - alt.binaries.tv.deutsch - alt.binaries.ath - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 0 - - - - http://www.newzbin.com/browse/post/5913200/nzb/ - poster17@illuminatenboard.org <JBinUp@JBinUp> - 387306157 - Sat, 16 Jan 2010 01:42:41 GMT - - 4 - 0 - - - Fri, 14 Jan 2011 21:03:52 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/5666339/ - http://www.newzbin.com/browse/post/5666339/ - http://www.newzbin.com/browse/post/5666339/#CommentsPH - - -
  • - ID: 5666339 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 400.7MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - DVD | Video Format - XviD | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - German -
  • -
  • Groups: alt.binaries.cores, alt.binaries.tv.deutsch, alt.binaries.mom, alt.binaries.ath, alt.binaries.ghosts
  • -
  • Poster: JBinUp.com <JBinUp@JBinUp.local>
  • -
  • PostDate: Tuesday 12 Jan 2010, 03:15PM PDT
  • - ]]> -
    - 5666339 - TV - - DVD - XviD - Action/Adv - Comedy - Crime - Drama - German - - - alt.binaries.cores - alt.binaries.tv.deutsch - alt.binaries.mom - alt.binaries.ath - alt.binaries.ghosts - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 285077994 - isd-plain-s01e11.nfo - http://www.newzbin.com/nfo/view/txt/285077994/ - - http://www.newzbin.com/browse/post/5666339/nzb/ - JBinUp.com <JBinUp@JBinUp.local> - 420211504 - Tue, 12 Jan 2010 23:15:45 GMT - - 11 - 0 - - - Fri, 25 Jun 2010 18:46:39 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/5663181/ - http://www.newzbin.com/browse/post/5663181/ - http://www.newzbin.com/browse/post/5663181/#CommentsPH - - -
  • - ID: 5663181 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 400.6MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - DVD | Video Format - XviD | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - French -
  • -
  • Groups: alt.binaries.movies.zeromovies, alt.binaries.series.tv.divx.french
  • -
  • Poster: per amica silentia lunae <mail@mail.com>
  • -
  • PostDate: Wednesday 16 Jun 2010, 09:27AM PDT
  • - ]]> -
    - 5663181 - TV - - DVD - XviD - Action/Adv - Comedy - Crime - Drama - French - - - alt.binaries.movies.zeromovies - alt.binaries.series.tv.divx.french - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 0 - - - - http://www.newzbin.com/browse/post/5663181/nzb/ - per amica silentia lunae <mail@mail.com> - 420039144 - Wed, 16 Jun 2010 16:27:43 GMT - - 2 - 0 - - - Wed, 23 Jun 2010 12:52:27 GMT -
    - - In Plain Sight - 1x11 - Stan By Me - http://www.newzbin.com/browse/post/5576127/ - http://www.newzbin.com/browse/post/5576127/ - http://www.newzbin.com/browse/post/5576127/#CommentsPH - - -
  • - ID: 5576127 - (Bookmark) - (NZB) - (NFO) - (More Info) - (Size: 1,490.2MB) -
  • -
  • - Attributes: - Category - TV - | Video Source - HDTV | Video Format - H.264, 720p | Video Genre - Action/Adv, Comedy, Crime, Drama | Language - French, German -
  • -
  • Groups: alt.binaries.ath, alt.binaries.hdtv.x264, alt.binaries.U-4all, alt.binaries.hdtv.german
  • -
  • Poster: ich <usenet@u-4all.org>
  • -
  • PostDate: Monday 22 Feb 2010, 02:33AM PDT
  • - ]]> -
    - 5576127 - TV - - HDTV - H.264 - 720p - Action/Adv - Comedy - Crime - Drama - English - German - - - alt.binaries.ath - alt.binaries.hdtv.x264 - alt.binaries.U-4all - alt.binaries.hdtv.german - - Report is complete - http://www.tvrage.com/In_Plain_Sight/episodes/665532/1x11/ - - 0 - - - - http://www.newzbin.com/browse/post/5576127/nzb/ - ich <usenet@u-4all.org> - 1562556611 - Mon, 22 Feb 2010 10:33:35 GMT - - 31 - 0 - - - Fri, 26 Feb 2010 10:20:12 GMT -
    -
    -
    \ No newline at end of file diff --git a/NzbDrone.Core.Test/IndexerTests.cs b/NzbDrone.Core.Test/IndexerTests.cs index 6f430ddc2..db8aff2be 100644 --- a/NzbDrone.Core.Test/IndexerTests.cs +++ b/NzbDrone.Core.Test/IndexerTests.cs @@ -27,7 +27,6 @@ namespace NzbDrone.Core.Test public class IndexerTests : CoreTest { [TestCase("nzbsrus.xml")] - [TestCase("newzbin.xml")] [TestCase("nzbmatrix.xml")] [TestCase("newznab.xml")] [TestCase("wombles.xml")] diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs index 26d7e1dce..d8e1a3181 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs @@ -58,21 +58,6 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests Mocker.Resolve().DownloadNzb(url, title, false).Should().BeTrue(); } - [Test] - public void newzbin_add_url_should_format_request_properly() - { - Mocker.GetMock(MockBehavior.Strict) - .Setup(s => s.DownloadString("http://192.168.5.55:2222/api?mode=addid&name=6107863&priority=0&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass")) - .Returns("{ \"status\": true }"); - - - //Act - bool result = Mocker.Resolve().DownloadNzb("http://www.newzbin.com/browse/post/6107863/nzb", title, false); - - //Assert - result.Should().BeTrue(); - } - [Test] public void add_by_url_should_detect_and_handle_sab_errors() { diff --git a/NzbDrone.Core/Providers/DownloadClients/SabProvider.cs b/NzbDrone.Core/Providers/DownloadClients/SabProvider.cs index 9b18b5b44..b085f0178 100644 --- a/NzbDrone.Core/Providers/DownloadClients/SabProvider.cs +++ b/NzbDrone.Core/Providers/DownloadClients/SabProvider.cs @@ -33,18 +33,6 @@ namespace NzbDrone.Core.Providers.DownloadClients { } - private static string GetNzbName(string urlString) - { - var url = new Uri(urlString); - if (url.Host.ToLower().Contains("newzbin")) - { - var postId = Regex.Match(urlString, @"\d{5,10}").Value; - return postId; - } - - return urlString.Replace("&", "%26"); - } - public virtual bool IsInQueue(EpisodeParseResult newParseResult) { try @@ -85,17 +73,12 @@ namespace NzbDrone.Core.Providers.DownloadClients string cat = _configProvider.SabTvCategory; int priority = recentlyAired ? (int)_configProvider.SabRecentTvPriority : (int)_configProvider.SabBacklogTvPriority; - string name = GetNzbName(url); + string name = url.Replace("&", "%26"); string nzbName = HttpUtility.UrlEncode(title); string action = string.Format("mode=addurl&name={0}&priority={1}&pp=3&cat={2}&nzbname={3}&output=json", name, priority, cat, nzbName); - if (url.ToLower().Contains("newzbin")) - { - action = action.Replace("mode=addurl", "mode=addid"); - } - string request = GetSabRequest(action); logger.Info("Adding report [{0}] to the queue.", title); diff --git a/NzbDrone.Web/Views/Settings/Indexers.cshtml b/NzbDrone.Web/Views/Settings/Indexers.cshtml index 1a98880d9..05cd27515 100644 --- a/NzbDrone.Web/Views/Settings/Indexers.cshtml +++ b/NzbDrone.Web/Views/Settings/Indexers.cshtml @@ -202,9 +202,6 @@ if (id == 'NzbsRUsEnabled') $('#nzbsRusStatus').prop('checked', checked); - if (id == 'NewzbinEnabled') - $('#newzbinStatus').prop('checked', checked); - if (id == 'NewznabEnabled') $('#newznabStatus').prop('checked', checked); @@ -234,9 +231,6 @@ if (id == 'nzbsRusStatus') $('#NzbsRUsEnabled').prop('checked', checked); - if (id == 'newzbinStatus') - $('#NewzbinEnabled').prop('checked', checked); - if (id == 'newznabStatus') $('#NewznabEnabled').prop('checked', checked);