|
|
|
@ -1998,39 +1998,36 @@ namespace Emby.Server.Implementations.Library
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Folder> GetCollectionFolders(BaseItem item)
|
|
|
|
|
{
|
|
|
|
|
return GetCollectionFolders(item, GetUserRootFolder().Children.OfType<Folder>());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Folder> GetCollectionFolders(BaseItem item, IEnumerable<Folder> allUserRootChildren)
|
|
|
|
|
{
|
|
|
|
|
while (item is not null)
|
|
|
|
|
{
|
|
|
|
|
var parent = item.GetParent();
|
|
|
|
|
|
|
|
|
|
if (parent is null || parent is AggregateFolder)
|
|
|
|
|
if (parent is AggregateFolder)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
item = parent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item is null)
|
|
|
|
|
{
|
|
|
|
|
return new List<Folder>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return GetCollectionFoldersInternal(item, GetUserRootFolder().Children.OfType<Folder>());
|
|
|
|
|
}
|
|
|
|
|
if (parent is null)
|
|
|
|
|
{
|
|
|
|
|
var owner = item.GetOwner();
|
|
|
|
|
|
|
|
|
|
public List<Folder> GetCollectionFolders(BaseItem item, List<Folder> allUserRootChildren)
|
|
|
|
|
{
|
|
|
|
|
while (item is not null)
|
|
|
|
|
{
|
|
|
|
|
var parent = item.GetParent();
|
|
|
|
|
if (owner is null)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (parent is null || parent is AggregateFolder)
|
|
|
|
|
item = owner;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
item = parent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
item = parent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item is null)
|
|
|
|
|