diff --git a/NzbDrone.Core.Test/Files/RSS/newbin_none_english.xml b/NzbDrone.Core.Test/Files/RSS/newbin_none_english.xml
new file mode 100644
index 000000000..01f0ca10b
--- /dev/null
+++ b/NzbDrone.Core.Test/Files/RSS/newbin_none_english.xml
@@ -0,0 +1,577 @@
+
+
+
+ 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 5392c6e96..90522688a 100644
--- a/NzbDrone.Core.Test/IndexerTests.cs
+++ b/NzbDrone.Core.Test/IndexerTests.cs
@@ -57,6 +57,31 @@ public void parse_feed_xml(string fileName, int warns)
ExceptionVerification.ExcpectedWarns(warns);
}
+ [Test]
+ public void newzbin_parses_languae()
+ {
+ var mocker = new AutoMoqer();
+
+ mocker.GetMock()
+ .Setup(h => h.DownloadStream(It.IsAny(), It.IsAny()))
+ .Returns(File.OpenRead(".\\Files\\Rss\\newbin_none_english.xml"));
+
+
+
+ var newzbin = mocker.Resolve();
+ var parseResults = newzbin.FetchRss();
+
+ foreach (var episodeParseResult in parseResults)
+ {
+ var Uri = new Uri(episodeParseResult.NzbUrl);
+ Uri.PathAndQuery.Should().NotContain("//");
+ }
+
+
+ parseResults.Should().NotBeEmpty();
+ parseResults.Should().NotContain(e => e.Language == LanguageType.English);
+ }
+
[Test]
public void newzbin_rss_fetch()
{
@@ -162,6 +187,7 @@ public void downloadFeed()
[TestCase("simpsons", 21, 23)]
[TestCase("Hawaii Five-0 (2010)", 1, 5)]
+ [TestCase("In plain Sight", 1, 4)]
public void nzbsorg_search_returns_valid_results(string title, int season, int episode)
{
var mocker = new AutoMoqer();
diff --git a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj
index e933c681c..cb0193817 100644
--- a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj
+++ b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj
@@ -140,6 +140,9 @@
+
+ Always
+
Always
diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs
index 997010ae3..0d983fd6b 100644
--- a/NzbDrone.Core/Parser.cs
+++ b/NzbDrone.Core/Parser.cs
@@ -305,7 +305,7 @@ internal static Quality ParseQuality(string name)
- internal static LanguageType ParseLanguage(string title)
+ public static LanguageType ParseLanguage(string title)
{
var lowerTitle = title.ToLower();
diff --git a/NzbDrone.Core/Providers/Indexer/IndexerBase.cs b/NzbDrone.Core/Providers/Indexer/IndexerBase.cs
index 225ed5cbe..a0379f1b6 100644
--- a/NzbDrone.Core/Providers/Indexer/IndexerBase.cs
+++ b/NzbDrone.Core/Providers/Indexer/IndexerBase.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Collections.Generic;
using System.Net;
using System.ServiceModel.Syndication;
@@ -112,6 +113,8 @@ public virtual IList FetchEpisode(string seriesTitle, int se
result.AddRange(Fetch(url));
}
+ result = result.Where(e => e.CleanTitle == Parser.NormalizeTitle(seriesTitle)).ToList();
+
_logger.Info("Finished searching {0} for {1}-S{2}E{3:00}, Found {4}", Name, seriesTitle, seasonNumber, episodeNumber, result.Count);
return result;
diff --git a/NzbDrone.Core/Providers/Indexer/Newzbin.cs b/NzbDrone.Core/Providers/Indexer/Newzbin.cs
index 51f539894..f0f8b76de 100644
--- a/NzbDrone.Core/Providers/Indexer/Newzbin.cs
+++ b/NzbDrone.Core/Providers/Indexer/Newzbin.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Net;
using System.ServiceModel.Syndication;
+using System.Text.RegularExpressions;
using Ninject;
using NzbDrone.Core.Model;
using NzbDrone.Core.Providers.Core;
@@ -60,6 +61,10 @@ protected override EpisodeParseResult CustomParser(SyndicationItem item, Episode
var quality = Parser.ParseQuality(item.Summary.Text);
currentResult.Quality = quality;
+
+ var languageString = Regex.Match(item.Summary.Text, @"Language - \w*", RegexOptions.IgnoreCase).Value;
+
+ currentResult.Language = Parser.ParseLanguage(languageString);
}
return currentResult;
}