diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-05 02:01:31 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-07-05 02:01:31 -0400 |
| commit | 1fcbd3c6da5bd061473a3f34a6410c9bbce0fc13 (patch) | |
| tree | 2d27570ad71afa59d0f89bdfaeafa0ca06512929 /MediaBrowser.Controller/Entities/TV | |
| parent | 2772d595596b3e682dbce890e53bdc3ef027df46 (diff) | |
denormalize seriesid
Diffstat (limited to 'MediaBrowser.Controller/Entities/TV')
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Episode.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Season.cs | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 4ff1813fff..b13c291d11 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -248,7 +248,14 @@ namespace MediaBrowser.Controller.Entities.TV } [IgnoreDataMember] - public Guid? SeasonId { get; set; } + public Guid? SeasonId { get; set; }
+ public Guid? SeriesId { get; set; }
+
+ public Guid? FindSeriesId()
+ {
+ var series = Series;
+ return series == null ? (Guid?)null : series.Id;
+ } public override IEnumerable<Guid> GetAncestorIds() { diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index a689ca5508..218d0fef83 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -237,12 +237,20 @@ namespace MediaBrowser.Controller.Entities.TV [IgnoreDataMember] public string SeriesName { get; set; } + public Guid? SeriesId { get; set; } + public string FindSeriesName() { var series = Series; return series == null ? SeriesName : series.Name; } + public Guid? FindSeriesId() + { + var series = Series; + return series == null ? (Guid?)null : series.Id; + } + /// <summary> /// Gets the lookup information. /// </summary> |
