From 2772d595596b3e682dbce890e53bdc3ef027df46 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 5 Jul 2016 01:40:18 -0400 Subject: denormalize seasonid --- MediaBrowser.Controller/Entities/TV/Episode.cs | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index d7526a535..4ff1813ff 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -13,7 +13,6 @@ namespace MediaBrowser.Controller.Entities.TV /// public class Episode : Video, IHasTrailers, IHasLookupInfo, IHasSeries { - public Episode() { RemoteTrailers = new List(); @@ -181,6 +180,12 @@ namespace MediaBrowser.Controller.Entities.TV { var series = Series; return series == null ? SeriesName : series.Name; + } + + public Guid? FindSeasonId() + { + var season = Season; + return season == null ? (Guid?)null : season.Id; } /// @@ -243,21 +248,7 @@ namespace MediaBrowser.Controller.Entities.TV } [IgnoreDataMember] - public Guid? SeasonId - { - get - { - // First see if the parent is a Season - var season = Season; - - if (season != null) - { - return season.Id; - } - - return null; - } - } + public Guid? SeasonId { get; set; } public override IEnumerable GetAncestorIds() { -- cgit v1.2.3