diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-03-26 20:28:07 -0400 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-03-26 20:28:07 -0400 |
| commit | c309ff653a2be44c4d3b7cbae388bb121406725c (patch) | |
| tree | b9f25a69285e9d0fecc1ed7d9333dc07f6f5ade3 /MediaBrowser.Controller/Entities/TV | |
| parent | 4b3d5651e9cf8e76ba55ef1907b91ca3845f4f41 (diff) | |
Inherit ratings for episodes and seasons from series
Diffstat (limited to 'MediaBrowser.Controller/Entities/TV')
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Episode.cs | 24 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Season.cs | 24 |
2 files changed, 48 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 1ec3e97a9f..7588e4e692 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -118,6 +118,30 @@ namespace MediaBrowser.Controller.Entities.TV } /// <summary> + /// Our rating comes from our series + /// </summary> + public override string OfficialRating + { + get { return Series != null ? Series.OfficialRating : base.OfficialRating; } + set + { + base.OfficialRating = value; + } + } + + /// <summary> + /// Our rating comes from our series + /// </summary> + public override string CustomRating + { + get { return Series != null ? Series.CustomRating : base.CustomRating; } + set + { + base.CustomRating = value; + } + } + + /// <summary> /// We persist the MB Id of our series object so we can always find it no matter /// what context we happen to be loaded from. /// </summary> diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index 20c2ee1fed..2f2bee1721 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -112,6 +112,30 @@ namespace MediaBrowser.Controller.Entities.TV } /// <summary> + /// Our rating comes from our series + /// </summary> + public override string OfficialRating + { + get { return Series != null ? Series.OfficialRating : base.OfficialRating; } + set + { + base.OfficialRating = value; + } + } + + /// <summary> + /// Our rating comes from our series + /// </summary> + public override string CustomRating + { + get { return Series != null ? Series.CustomRating : base.CustomRating; } + set + { + base.CustomRating = value; + } + } + + /// <summary> /// Add files from the metadata folder to ResolveArgs /// </summary> /// <param name="args">The args.</param> |
