Fix collection folders not seeing derived folder types
This commit is contained in:
parent
aa9fd63224
commit
b02287c0dd
|
@ -73,26 +73,11 @@ namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
Dictionary<Guid,Guid> folderIds;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Accessing ResolveArgs could involve file system access
|
|
||||||
folderIds = ResolveArgs.PhysicalLocations
|
|
||||||
.Select(f => f.GetMBId(typeof(Folder)))
|
|
||||||
.ToDictionary(i => i);
|
|
||||||
}
|
|
||||||
catch (IOException ex)
|
|
||||||
{
|
|
||||||
Logger.ErrorException("Error creating FolderIds for {0}", ex, Path);
|
|
||||||
|
|
||||||
folderIds = new Dictionary<Guid, Guid>();
|
|
||||||
}
|
|
||||||
|
|
||||||
var ourChildren =
|
var ourChildren =
|
||||||
LibraryManager.RootFolder.RecursiveChildren.OfType<Folder>()
|
LibraryManager.RootFolder.RecursiveChildren
|
||||||
.Where(i => folderIds.ContainsKey(i.Id))
|
.Where(i => i is Folder && i.Path != null && ResolveArgs.PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase))
|
||||||
.SelectMany(c => c.Children);
|
.Cast<Folder>().SelectMany(c => c.Children);
|
||||||
|
|
||||||
return new ConcurrentDictionary<Guid,BaseItem>(ourChildren.ToDictionary(i => i.Id));
|
return new ConcurrentDictionary<Guid,BaseItem>(ourChildren.ToDictionary(i => i.Id));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user