aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/TV
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-03 09:24:23 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-03 09:24:23 -0400
commit0e4972f7e63002fb3a4caeb96bafd097bc1ed56b (patch)
tree6198d7db1a5ee6d156a02b69cbac1abbb8df083c /MediaBrowser.Controller/Entities/TV
parenta52ea4cf084c0e734fa9cd76e332b8e80d9f255b (diff)
reduced some virtualization
Diffstat (limited to 'MediaBrowser.Controller/Entities/TV')
-rw-r--r--MediaBrowser.Controller/Entities/TV/Episode.cs43
-rw-r--r--MediaBrowser.Controller/Entities/TV/Season.cs18
2 files changed, 19 insertions, 42 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs
index 7e8540ebe7..bef98bf9df 100644
--- a/MediaBrowser.Controller/Entities/TV/Episode.cs
+++ b/MediaBrowser.Controller/Entities/TV/Episode.cs
@@ -73,59 +73,42 @@ namespace MediaBrowser.Controller.Entities.TV
}
}
- /// <summary>
- /// Gets or sets the studios.
- /// </summary>
- /// <value>The studios.</value>
[IgnoreDataMember]
- public override List<string> Studios
+ public override IEnumerable<string> AllGenres
{
get
{
- return Series != null ? Series.Studios : null;
- }
- set
- {
- base.Studios = value;
+ if (Genres == null) return Series != null ? Series.Genres : Genres;
+ return Series != null && Series.Genres != null ? Genres.Concat(Series.Genres) : base.AllGenres;
}
}
- /// <summary>
- /// Gets or sets the genres.
- /// </summary>
- /// <value>The genres.</value>
[IgnoreDataMember]
- public override List<string> Genres
+ public override IEnumerable<string> AllStudios
{
- get { return Series != null ? Series.Genres : null; }
- set
+ get
{
- base.Genres = value;
+ if (Studios == null) return Series != null ? Series.Studios : Studios;
+ return Series != null && Series.Studios != null ? Studios.Concat(Series.Studios) : base.AllStudios;
}
}
/// <summary>
/// Our rating comes from our series
/// </summary>
- public override string OfficialRating
+ [IgnoreDataMember]
+ public override string OfficialRatingForComparison
{
- get { return Series != null ? Series.OfficialRating : base.OfficialRating; }
- set
- {
- base.OfficialRating = value;
- }
+ get { return Series != null ? Series.OfficialRatingForComparison : base.OfficialRatingForComparison; }
}
/// <summary>
/// Our rating comes from our series
/// </summary>
- public override string CustomRating
+ [IgnoreDataMember]
+ public override string CustomRatingForComparison
{
- get { return Series != null ? Series.CustomRating : base.CustomRating; }
- set
- {
- base.CustomRating = value;
- }
+ get { return Series != null ? Series.CustomRatingForComparison : base.CustomRatingForComparison; }
}
/// <summary>
diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs
index b4dc3eae40..9f15de920a 100644
--- a/MediaBrowser.Controller/Entities/TV/Season.cs
+++ b/MediaBrowser.Controller/Entities/TV/Season.cs
@@ -96,25 +96,19 @@ namespace MediaBrowser.Controller.Entities.TV
/// <summary>
/// Our rating comes from our series
/// </summary>
- public override string OfficialRating
+ [IgnoreDataMember]
+ public override string OfficialRatingForComparison
{
- get { return Series != null ? Series.OfficialRating : base.OfficialRating; }
- set
- {
- base.OfficialRating = value;
- }
+ get { return Series != null ? Series.OfficialRatingForComparison : base.OfficialRatingForComparison; }
}
/// <summary>
/// Our rating comes from our series
/// </summary>
- public override string CustomRating
+ [IgnoreDataMember]
+ public override string CustomRatingForComparison
{
- get { return Series != null ? Series.CustomRating : base.CustomRating; }
- set
- {
- base.CustomRating = value;
- }
+ get { return Series != null ? Series.CustomRatingForComparison : base.CustomRatingForComparison; }
}
/// <summary>