From 0e4972f7e63002fb3a4caeb96bafd097bc1ed56b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 3 Aug 2013 09:24:23 -0400 Subject: reduced some virtualization --- MediaBrowser.Controller/Entities/BaseItem.cs | 32 ++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs') diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 35639925d8..ab30d9ef73 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -469,7 +469,7 @@ namespace MediaBrowser.Controller.Entities /// Gets or sets the official rating. /// /// The official rating. - public virtual string OfficialRating { get; set; } + public string OfficialRating { get; set; } /// /// Gets or sets the official rating description. @@ -481,7 +481,7 @@ namespace MediaBrowser.Controller.Entities /// Gets or sets the custom rating. /// /// The custom rating. - public virtual string CustomRating { get; set; } + public string CustomRating { get; set; } /// /// Gets or sets the language. @@ -521,6 +521,18 @@ namespace MediaBrowser.Controller.Entities get { return People; } } + [IgnoreDataMember] + public virtual IEnumerable AllStudios + { + get { return Studios; } + } + + [IgnoreDataMember] + public virtual IEnumerable AllGenres + { + get { return Genres; } + } + /// /// Gets or sets the studios. /// @@ -620,6 +632,18 @@ namespace MediaBrowser.Controller.Entities public List ThemeVideoIds { get; set; } public List LocalTrailerIds { get; set; } + [IgnoreDataMember] + public virtual string OfficialRatingForComparison + { + get { return OfficialRating; } + } + + [IgnoreDataMember] + public virtual string CustomRatingForComparison + { + get { return CustomRating; } + } + /// /// Loads local trailers from the file system /// @@ -992,11 +1016,11 @@ namespace MediaBrowser.Controller.Entities return true; } - var rating = CustomRating; + var rating = CustomRatingForComparison; if (string.IsNullOrEmpty(rating)) { - rating = OfficialRating; + rating = OfficialRatingForComparison; } if (string.IsNullOrEmpty(rating)) -- cgit v1.2.3