Added additional logging to episode searching.

pull/4/head
Mark McDowall 13 years ago
parent d5e62bc70b
commit c0542449a4

@ -137,6 +137,7 @@ namespace NzbDrone.Core.Test
[TestCase("WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", QualityTypes.DVD)]
[TestCase("WEEDS.S03E01-06.DUAL.Bluray.AC3.-HELLYWOOD.avi", QualityTypes.Bluray720p)]
[TestCase("The Voice S01E11 The Finals 1080i HDTV DD5.1 MPEG2-TrollHD", QualityTypes.Unknown)]
[TestCase("Nikita S02E01 HDTV XviD 2HD", QualityTypes.SDTV)]
public void quality_parse(string postTitle, object quality)
{
var result = Parser.ParseQuality(postTitle);

@ -42,6 +42,8 @@ namespace NzbDrone.Core.Providers
if (addSuccess)
{
Logger.Trace("Download added to Queue: {0}", sabTitle);
foreach (var episode in _episodeProvider.GetEpisodesByParseResult(parseResult))
{
var history = new History();

@ -87,7 +87,10 @@ namespace NzbDrone.Core.Providers
var cutoff = parsedReport.Series.QualityProfile.Cutoff;
if (!IsAcceptableSize(parsedReport))
{
Logger.Trace("Size: {0} is not acceptable for Quality: {1}", parsedReport.Size, parsedReport.Q);
return false;
}
foreach (var episode in _episodeProvider.GetEpisodesByParseResult(parsedReport, true))
{

@ -229,19 +229,31 @@ namespace NzbDrone.Core.Providers
//If series is null or doesn't match the series we're looking for return
if (episodeParseResult.Series == null || episodeParseResult.Series.SeriesId != series.SeriesId)
{
Logger.Trace("Unexpected series for search: {0}. Skipping.", episodeParseResult.CleanTitle);
continue;
}
//If SeasonNumber doesn't match or episode is not in the in the list in the parse result, skip the report.
if (episodeParseResult.SeasonNumber != seasonNumber)
{
Logger.Trace("Season number does not match searched season number, skipping.");
continue;
}
//If the EpisodeNumber was passed in and it is not contained in the parseResult, skip the report.
if (episodeNumber.HasValue && !episodeParseResult.EpisodeNumbers.Contains(episodeNumber.Value))
{
Logger.Trace("Searched episode number is not contained in post, skipping.");
continue;
}
//Make sure we haven't already downloaded a report with this episodenumber, if we have, skip the report.
if (successes.Intersect(episodeParseResult.EpisodeNumbers).Count() > 0)
{
Logger.Trace("Episode has already been downloaded in this search, skipping.");
continue;
}
if (_inventoryProvider.IsQualityNeeded(episodeParseResult, true))
{

Loading…
Cancel
Save