Episode.AirDate will be nulled if its before Series.FirstAired

pull/4/head
Mark McDowall 12 years ago
parent 1809aefea2
commit d33b152a44

@ -65,8 +65,6 @@ namespace NzbDrone.Core.Tv
{ {
var tuple = _seriesInfo.GetSeriesInfo(series.TvdbId); var tuple = _seriesInfo.GetSeriesInfo(series.TvdbId);
RefreshEpisodeInfo(series, tuple.Item2);
var seriesInfo = tuple.Item1; var seriesInfo = tuple.Item1;
series.Title = seriesInfo.Title; series.Title = seriesInfo.Title;
@ -81,7 +79,7 @@ namespace NzbDrone.Core.Tv
series.FirstAired = seriesInfo.FirstAired; series.FirstAired = seriesInfo.FirstAired;
_seriesService.UpdateSeries(series); _seriesService.UpdateSeries(series);
//Todo: We need to get the UtcOffset from TVRage, since its not available from trakt RefreshEpisodeInfo(series, tuple.Item2);
_messageAggregator.PublishEvent(new SeriesUpdatedEvent(series)); _messageAggregator.PublishEvent(new SeriesUpdatedEvent(series));
} }
@ -147,6 +145,8 @@ 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)

Loading…
Cancel
Save