aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Collections/CollectionManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Collections/CollectionManager.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
index 1cfcef514..9a196cc47 100644
--- a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
+++ b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
@@ -81,7 +81,13 @@ namespace MediaBrowser.Server.Implementations.Collections
throw new ArgumentNullException("parentId");
}
- return _libraryManager.GetItemById(parentId.Value) as Folder;
+ var folder = _libraryManager.GetItemById(parentId.Value) as Folder;
+
+ // Find an actual physical folder
+ if (folder is CollectionFolder)
+ {
+ return _libraryManager.RootFolder.Children.OfType<Folder>().First(i => folder.PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase));
+ }
}
return _libraryManager.RootFolder.Children.OfType<ManualCollectionsFolder>().FirstOrDefault() ??