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/7/merge
Mark McDowall 14 years ago
parent 7a57ab98dc
commit dc552ec873

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

Loading…
Cancel
Save