1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-25 17:27:18 +00:00

No longer setting AirDate to null if it aired before series start date

This was causing an issue which is caused by bad data coming from trakt...
This commit is contained in:
Mark McDowall 2013-07-11 20:38:25 -07:00
parent e1f2b0da69
commit 9b80478f6f
2 changed files with 2 additions and 5 deletions

View file

@ -144,8 +144,6 @@ namespace NzbDrone.Core.Tv
episodeToUpdate.Overview = episode.Overview; episodeToUpdate.Overview = episode.Overview;
episodeToUpdate.AirDate = episode.AirDate; episodeToUpdate.AirDate = episode.AirDate;
if (episodeToUpdate.AirDate < series.FirstAired) episodeToUpdate.AirDate = null;
successCount++; successCount++;
} }
catch (Exception e) catch (Exception e)
@ -201,7 +199,7 @@ namespace NzbDrone.Core.Tv
/* private void DeleteEpisodesNotAvailableAnymore(Series series, IEnumerable<Episode> onlineEpisodes) /* private void DeleteEpisodesNotAvailableAnymore(Series series, IEnumerable<Episode> onlineEpisodes)
{ {
//Todo: This will not work as currently implemented - what are we trying to do here? //Todo: This will not work as currently implemented - what are we trying to do here?
* //We were trying to remove episodes that were once on tvdb but were removed, for whatever reason, instead of polluting our DB with them. //Todo: We were trying to remove episodes that were once on tvdb but were removed, for whatever reason, instead of polluting our DB with them.
return; return;
_logger.Trace("Starting deletion of episodes that no longer exist in TVDB: {0}", series.Title.WithDefault(series.Id)); _logger.Trace("Starting deletion of episodes that no longer exist in TVDB: {0}", series.Title.WithDefault(series.Id));
foreach (var episode in onlineEpisodes) foreach (var episode in onlineEpisodes)

View file

@ -96,7 +96,7 @@ namespace NzbDrone.Core.Tv
series.QualityProfileId = edited.QualityProfileId; series.QualityProfileId = edited.QualityProfileId;
series.Monitored = edited.Monitored; series.Monitored = edited.Monitored;
series.SeasonFolder = edited.SeasonFolder; series.SeasonFolder = edited.SeasonFolder;
//series.Path = edited.Path; series.Path = edited.Path;
series.CustomStartDate = edited.CustomStartDate; series.CustomStartDate = edited.CustomStartDate;
_seriesRepository.Update(series); _seriesRepository.Update(series);
@ -109,7 +109,6 @@ namespace NzbDrone.Core.Tv
return _seriesRepository.FindByTvdbId(tvdbId); return _seriesRepository.FindByTvdbId(tvdbId);
} }
public Series FindBySlug(string slug) public Series FindBySlug(string slug)
{ {
var series = _seriesRepository.FindBySlug(slug); var series = _seriesRepository.FindBySlug(slug);