reduced some virtualization

This commit is contained in:
Luke Pulverenti
2013-08-03 09:24:23 -04:00
parent a52ea4cf08
commit 0e4972f7e6
7 changed files with 70 additions and 68 deletions

View File

@@ -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>

View File

@@ -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>