Fixed: fixed an issue where season ignore check wasn't working correctly.

Fixed: unavailable nzbdrone service will no longer block series from being added.
This commit is contained in:
kay.one 2012-02-27 21:50:56 -08:00
commit c5df00cc87
15 changed files with 222 additions and 360 deletions

View file

@ -11,7 +11,7 @@ namespace NzbDrone.Core.Jobs
private readonly SeasonSearchJob _seasonSearchJob;
private readonly SeasonProvider _seasonProvider;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public SeriesSearchJob(SeasonSearchJob seasonSearchJob,
SeasonProvider seasonProvider)
@ -35,16 +35,15 @@ namespace NzbDrone.Core.Jobs
if (targetId <= 0)
throw new ArgumentOutOfRangeException("targetId");
Logger.Debug("Getting seasons from database for series: {0}", targetId);
logger.Debug("Getting seasons from database for series: {0}", targetId);
var seasons = _seasonProvider.GetSeasons(targetId).Where(s => s > 0);
foreach (var season in seasons)
{
//Skip ignored seasons
if (_seasonProvider.IsIgnored(targetId, season))
continue;
_seasonSearchJob.Start(notification, targetId, season);
if (!_seasonProvider.IsIgnored(targetId, season))
{
_seasonSearchJob.Start(notification, targetId, season);
}
}
}
}