aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-21 00:49:17 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-21 00:49:17 -0400
commitb253d26abadc782c5bddc5ac5352ebe116154553 (patch)
treee2648ab8fc6106aa0a3218cd2ce49a93a9ecb1da /MediaBrowser.Server.Implementations/Library/LibraryManager.cs
parenta49a905ca2e00753d3658b0a4244374dbcfbed48 (diff)
parent7596365af2fa819d440e1ae65befea88aec29bde (diff)
Merge branch 'beta'
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 1407cdce3..56d3bd4de 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -1448,8 +1448,12 @@ namespace MediaBrowser.Server.Implementations.Library
// Handle grouping
if (user != null && !string.IsNullOrWhiteSpace(view.ViewType) && UserView.IsEligibleForGrouping(view.ViewType))
{
- var collectionFolders = user.RootFolder.GetChildren(user, true).OfType<CollectionFolder>().Where(i => string.IsNullOrWhiteSpace(i.CollectionType) || string.Equals(i.CollectionType, view.ViewType, StringComparison.OrdinalIgnoreCase));
- return collectionFolders.SelectMany(i => GetTopParentsForQuery(i, user));
+ return user.RootFolder
+ .GetChildren(user, true)
+ .OfType<CollectionFolder>()
+ .Where(i => string.IsNullOrWhiteSpace(i.CollectionType) || string.Equals(i.CollectionType, view.ViewType, StringComparison.OrdinalIgnoreCase))
+ .Where(i => user.IsFolderGrouped(i.Id))
+ .SelectMany(i => GetTopParentsForQuery(i, user));
}
return new BaseItem[] { };
}