aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 65905b082..b692e97f3 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -269,16 +269,16 @@ namespace MediaBrowser.Server.Implementations.Library
// Need to use DistinctBy Id because there could be multiple instances with the same id
// due to sharing the default library
var userRootFolders = _userManager.Users.Select(i => i.RootFolder)
- .DistinctBy(i => i.Id)
+ .Distinct()
.ToList();
items.AddRange(userRootFolders);
// Get all user collection folders
+ // Skip BasePluginFolders because we already got them from RootFolder.RecursiveChildren
var userFolders =
- _userManager.Users.SelectMany(i => i.RootFolder.Children)
+ userRootFolders.SelectMany(i => i.Children)
.Where(i => !(i is BasePluginFolder))
- .DistinctBy(i => i.Id)
.ToList();
items.AddRange(userFolders);