Fix: Newzbin custom parser will now reject full DVD reports.

Fixes bug: ND-31
This commit is contained in:
Mark McDowall 2012-02-29 08:32:58 -08:00
commit 64a913fb8e
4 changed files with 104 additions and 0 deletions

View file

@ -7,6 +7,7 @@ using Ninject;
using NzbDrone.Common;
using NzbDrone.Core.Model;
using NzbDrone.Core.Providers.Core;
using NzbDrone.Core.Repository.Quality;
namespace NzbDrone.Core.Providers.Indexer
{
@ -107,6 +108,12 @@ namespace NzbDrone.Core.Providers.Indexer
var quality = Parser.ParseQuality(item.Summary.Text);
currentResult.Quality = quality;
if (Regex.IsMatch(item.Summary.Text, @"\|\s+Video Format - DVD\s+\|", RegexOptions.Compiled | RegexOptions.IgnoreCase))
{
_logger.Trace("Report is a full DVD, setting Quality to False");
currentResult.Quality = new Quality(QualityTypes.Unknown, false);
}
var languageString = Regex.Match(item.Summary.Text, @"Language - \w*", RegexOptions.IgnoreCase).Value;
currentResult.Language = Parser.ParseLanguage(languageString);