|
|
@ -342,19 +342,14 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
var candidates = GetRecursiveChildren(user).Where(i => i.IncludeInIndex).ToList();
|
|
|
|
var candidates = GetRecursiveChildren(user).Where(i => i.IncludeInIndex).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
return candidates.AsParallel().SelectMany(i => i.AllGenres)
|
|
|
|
return candidates.AsParallel().SelectMany(i => i.AllGenres)
|
|
|
|
.Distinct()
|
|
|
|
.Distinct(StringComparer.OrdinalIgnoreCase)
|
|
|
|
.Select(i =>
|
|
|
|
.Select(i =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return LibraryManager.GetGenre(i).Result;
|
|
|
|
return LibraryManager.GetGenre(i).Result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (IOException ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
|
|
|
|
Logger.ErrorException("Error getting genre {0}", ex, i);
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (AggregateException ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Logger.ErrorException("Error getting genre {0}", ex, i);
|
|
|
|
Logger.ErrorException("Error getting genre {0}", ex, i);
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|