|
|
@ -126,20 +126,17 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Never want folders to be blocked by "BlockNotRated"
|
|
|
|
/// Never want folders to be blocked by "BlockNotRated"
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public override string OfficialRating
|
|
|
|
[IgnoreDataMember]
|
|
|
|
|
|
|
|
public override string OfficialRatingForComparison
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get
|
|
|
|
get
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (this is Series)
|
|
|
|
if (this is Series)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return base.OfficialRating;
|
|
|
|
return base.OfficialRatingForComparison;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return !string.IsNullOrEmpty(base.OfficialRating) ? base.OfficialRating : "None";
|
|
|
|
return !string.IsNullOrEmpty(base.OfficialRatingForComparison) ? base.OfficialRatingForComparison : "None";
|
|
|
|
}
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
base.OfficialRating = value;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -316,9 +313,9 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var indexName = LocalizedStrings.Instance.GetString("StudioDispPref");
|
|
|
|
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()
|
|
|
|
.Distinct()
|
|
|
|
.Select(i =>
|
|
|
|
.Select(i =>
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -338,7 +335,7 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.Where(i => i != null)
|
|
|
|
.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");
|
|
|
|
var indexName = LocalizedStrings.Instance.GetString("GenreDispPref");
|
|
|
|
|
|
|
|
|
|
|
|
//we need a copy of this so we don't double-recurse
|
|
|
|
//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()
|
|
|
|
.Distinct()
|
|
|
|
.Select(i =>
|
|
|
|
.Select(i =>
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -378,7 +375,7 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.Where(i => i != null)
|
|
|
|
.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)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|