diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-06 10:58:49 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-06 10:58:49 -0500 |
| commit | 38d88aed5811d22feef83e05753d95624efe0ded (patch) | |
| tree | 7f762cbcb44d8d5ca2390b6b2991eb21d5d3f0d2 /MediaBrowser.Controller/Entities/TV | |
| parent | ca0583bcbee3b2a66dfa2a25c63fb62081fe1239 (diff) | |
Inherit custom rating
Diffstat (limited to 'MediaBrowser.Controller/Entities/TV')
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Episode.cs | 21 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Season.cs | 15 |
2 files changed, 14 insertions, 22 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 73726a4e28..c1535bde02 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -98,9 +98,11 @@ namespace MediaBrowser.Controller.Entities.TV /// <returns>System.String.</returns> public override string GetUserDataKey() { - if (Series != null && ParentIndexNumber.HasValue && IndexNumber.HasValue) + var series = Series; + + if (series != null && ParentIndexNumber.HasValue && IndexNumber.HasValue) { - return Series.GetUserDataKey() + ParentIndexNumber.Value.ToString("000") + IndexNumber.Value.ToString("000"); + return series.GetUserDataKey() + ParentIndexNumber.Value.ToString("000") + IndexNumber.Value.ToString("000"); } return base.GetUserDataKey(); @@ -112,16 +114,11 @@ namespace MediaBrowser.Controller.Entities.TV [IgnoreDataMember] public override string OfficialRatingForComparison { - get { return Series != null ? Series.OfficialRatingForComparison : base.OfficialRatingForComparison; } - } - - /// <summary> - /// Our rating comes from our series - /// </summary> - [IgnoreDataMember] - public override string CustomRatingForComparison - { - get { return Series != null ? Series.CustomRatingForComparison : base.CustomRatingForComparison; } + get + { + var series = Series; + return series != null ? series.OfficialRatingForComparison : base.OfficialRatingForComparison; + } } /// <summary> diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index 7444165603..bc7e75b726 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -119,16 +119,11 @@ namespace MediaBrowser.Controller.Entities.TV [IgnoreDataMember] public override string OfficialRatingForComparison { - get { return Series != null ? Series.OfficialRatingForComparison : base.OfficialRatingForComparison; } - } - - /// <summary> - /// Our rating comes from our series - /// </summary> - [IgnoreDataMember] - public override string CustomRatingForComparison - { - get { return Series != null ? Series.CustomRatingForComparison : base.CustomRatingForComparison; } + get + { + var series = Series; + return series != null ? series.OfficialRatingForComparison : base.OfficialRatingForComparison; + } } /// <summary> |
