aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Folder.cs
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/Folder.cs
parenta52ea4cf084c0e734fa9cd76e332b8e80d9f255b (diff)
reduced some virtualization
Diffstat (limited to 'MediaBrowser.Controller/Entities/Folder.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs23
1 files changed, 10 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index dd39ccec96..9d394fac6b 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -126,20 +126,17 @@ namespace MediaBrowser.Controller.Entities
/// <summary>
/// Never want folders to be blocked by "BlockNotRated"
/// </summary>
- public override string OfficialRating
+ [IgnoreDataMember]
+ public override string OfficialRatingForComparison
{
get
{
if (this is Series)
{
- return base.OfficialRating;
+ return base.OfficialRatingForComparison;
}
- return !string.IsNullOrEmpty(base.OfficialRating) ? base.OfficialRating : "None";
- }
- set
- {
- base.OfficialRating = value;
+ return !string.IsNullOrEmpty(base.OfficialRatingForComparison) ? base.OfficialRatingForComparison : "None";
}
}
@@ -316,9 +313,9 @@ namespace MediaBrowser.Controller.Entities
{
var indexName = LocalizedStrings.Instance.GetString("StudioDispPref");
- var candidates = GetRecursiveChildren(user).Where(i => i.IncludeInIndex && i.Studios != null).ToList();
+ var candidates = GetRecursiveChildren(user).Where(i => i.IncludeInIndex).ToList();
- return candidates.AsParallel().SelectMany(i => i.Studios)
+ return candidates.AsParallel().SelectMany(i => i.AllStudios)
.Distinct()
.Select(i =>
{
@@ -338,7 +335,7 @@ namespace MediaBrowser.Controller.Entities
}
})
.Where(i => i != null)
- .Select(ndx => new IndexFolder(this, ndx, candidates.Where(i => i.Studios.Any(s => s.Equals(ndx.Name, StringComparison.OrdinalIgnoreCase))), indexName));
+ .Select(ndx => new IndexFolder(this, ndx, candidates.Where(i => i.AllStudios.Any(s => s.Equals(ndx.Name, StringComparison.OrdinalIgnoreCase))), indexName));
}
}
@@ -356,9 +353,9 @@ namespace MediaBrowser.Controller.Entities
var indexName = LocalizedStrings.Instance.GetString("GenreDispPref");
//we need a copy of this so we don't double-recurse
- var candidates = GetRecursiveChildren(user).Where(i => i.IncludeInIndex && i.Genres != null).ToList();
+ var candidates = GetRecursiveChildren(user).Where(i => i.IncludeInIndex).ToList();
- return candidates.AsParallel().SelectMany(i => i.Genres)
+ return candidates.AsParallel().SelectMany(i => i.AllGenres)
.Distinct()
.Select(i =>
{
@@ -378,7 +375,7 @@ namespace MediaBrowser.Controller.Entities
}
})
.Where(i => i != null)
- .Select(genre => new IndexFolder(this, genre, candidates.Where(i => i.Genres.Any(g => g.Equals(genre.Name, StringComparison.OrdinalIgnoreCase))), indexName)
+ .Select(genre => new IndexFolder(this, genre, candidates.Where(i => i.AllGenres.Any(g => g.Equals(genre.Name, StringComparison.OrdinalIgnoreCase))), indexName)
);
}
}