From 754c50aebaa9605793a06b9977d0340d384071d6 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 19 Apr 2013 17:46:09 -0700 Subject: [PATCH] Episode cleanup and added end date --- NzbDrone.Core/Tv/Episode.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/NzbDrone.Core/Tv/Episode.cs b/NzbDrone.Core/Tv/Episode.cs index addc4c10f..bb246d447 100644 --- a/NzbDrone.Core/Tv/Episode.cs +++ b/NzbDrone.Core/Tv/Episode.cs @@ -9,8 +9,8 @@ namespace NzbDrone.Core.Tv public class Episode : ModelBase { public int TvDbEpisodeId { get; set; } - public int SeriesId { get; set; } + public int EpisodeFileId { get; set; } public int SeasonNumber { get; set; } public int EpisodeNumber { get; set; } public string Title { get; set; } @@ -18,9 +18,7 @@ namespace NzbDrone.Core.Tv //Todo: Since we're displaying next airing relative to the user's time zone we may want to store this as UTC (with airtime + UTC offset) public DateTime? AirDate { get; set; } - public string Overview { get; set; } - public Boolean Ignored { get; set; } public PostDownloadStatusType PostDownloadStatus { get; set; } public Nullable AbsoluteEpisodeNumber { get; set; } @@ -34,10 +32,7 @@ namespace NzbDrone.Core.Tv { get { return EpisodeFile != null; } } - - public int EpisodeFileId { get; set; } - - + public EpisodeStatuses Status { get @@ -69,6 +64,17 @@ namespace NzbDrone.Core.Tv } } + public DateTime? EndTime + { + get + { + if (!AirDate.HasValue) return null; + if (Series == null) return null; + + return AirDate.Value.AddMinutes(Series.Runtime); + } + } + public Series Series { get; set; } public EpisodeFile EpisodeFile { get; set; }