From d1d0487feee578822e76ca48e88dc61b94080570 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 18 May 2016 01:34:10 -0400 Subject: update artist queries --- MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 1407cdce3..f61bac42d 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().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() + .Where(i => string.IsNullOrWhiteSpace(i.CollectionType) || string.Equals(i.CollectionType, view.ViewType, StringComparison.OrdinalIgnoreCase)) + .Where(i => user.Configuration.GroupedFolders.Contains(i.Id.ToString("N"), StringComparer.OrdinalIgnoreCase)) + .SelectMany(i => GetTopParentsForQuery(i, user)); } return new BaseItem[] { }; } -- cgit v1.2.3 From ab06f592753bca535f1bcf0a9d9fd689b8b9765f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 18 May 2016 13:02:56 -0400 Subject: update dialogs --- MediaBrowser.Controller/Entities/User.cs | 9 +-------- MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index e5b39003d..5c68308f5 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -305,14 +305,7 @@ namespace MediaBrowser.Controller.Entities public bool IsFolderGrouped(Guid id) { - var config = Configuration; - - if (config.ExcludeFoldersFromGrouping != null) - { - return !config.ExcludeFoldersFromGrouping.Select(i => new Guid(i)).Contains(id); - } - - return config.GroupedFolders.Select(i => new Guid(i)).Contains(id); + return Configuration.GroupedFolders.Select(i => new Guid(i)).Contains(id); } [IgnoreDataMember] diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index f61bac42d..56d3bd4de 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -1452,7 +1452,7 @@ namespace MediaBrowser.Server.Implementations.Library .GetChildren(user, true) .OfType() .Where(i => string.IsNullOrWhiteSpace(i.CollectionType) || string.Equals(i.CollectionType, view.ViewType, StringComparison.OrdinalIgnoreCase)) - .Where(i => user.Configuration.GroupedFolders.Contains(i.Id.ToString("N"), StringComparer.OrdinalIgnoreCase)) + .Where(i => user.IsFolderGrouped(i.Id)) .SelectMany(i => GetTopParentsForQuery(i, user)); } return new BaseItem[] { }; -- cgit v1.2.3