SeasonProvider.IsIgnored will properly handle a season that does not exist in the DB (TV DB doesn't have the latest season is root of the problem, or the season just started and NB DB is out of date).

pull/2/head
Mark McDowall 14 years ago
parent 7a57ab98dc
commit dc552ec873

@ -65,11 +65,12 @@ namespace NzbDrone.Core.Providers
public bool IsIgnored(int seriesId, int seasonNumber)
{
if (_sonicRepo.Single<Season>(s => s.SeriesId == seriesId && s.SeasonNumber == seasonNumber).Monitored)
return false;
var season = _sonicRepo.Single<Season>(s => s.SeriesId == seriesId && s.SeasonNumber == seasonNumber);
Logger.Debug("Season: {0} is not wanted for Series: {1}", seasonNumber, seriesId);
return true;
if (season == null)
return true;
return season.Monitored;
}
public void DeleteSeason(int seasonId)

Loading…
Cancel
Save