diff --git a/MediaBrowser.Controller/Entities/AggregateFolder.cs b/MediaBrowser.Controller/Entities/AggregateFolder.cs
index 10372eb49f..14f8c1617a 100644
--- a/MediaBrowser.Controller/Entities/AggregateFolder.cs
+++ b/MediaBrowser.Controller/Entities/AggregateFolder.cs
@@ -128,7 +128,7 @@ namespace MediaBrowser.Controller.Entities
/// IEnumerable{BaseItem}.
protected override IEnumerable GetNonCachedChildren(IDirectoryService directoryService)
{
- return base.GetNonCachedChildren(directoryService);
+ return base.GetNonCachedChildren(directoryService).Concat(_virtualChildren);
}
///
diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs
index a78beb645d..e6f3225950 100644
--- a/MediaBrowser.Controller/Entities/UserRootFolder.cs
+++ b/MediaBrowser.Controller/Entities/UserRootFolder.cs
@@ -55,13 +55,18 @@ namespace MediaBrowser.Controller.Entities
}
}
+ protected override IEnumerable GetEligibleChildrenForRecursiveChildren(User user)
+ {
+ return base.GetEligibleChildrenForRecursiveChildren(user).Concat(LibraryManager.RootFolder.VirtualChildren);
+ }
+
///
/// Get the children of this folder from the actual file system
///
/// IEnumerable{BaseItem}.
protected override IEnumerable GetNonCachedChildren(IDirectoryService directoryService)
{
- return base.GetNonCachedChildren(directoryService).Concat(LibraryManager.RootFolder.VirtualChildren);
+ return base.GetNonCachedChildren(directoryService);
}
public override bool BeforeMetadataRefresh()
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index f24edf086f..b5f1c21323 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -727,12 +727,12 @@ namespace MediaBrowser.Server.Implementations.Library
folder = dbItem;
}
- //if (folder.ParentId != rootFolder.Id)
- //{
- // folder.ParentId = rootFolder.Id;
- // var task = folder.UpdateToRepository(ItemUpdateType.MetadataImport, CancellationToken.None);
- // Task.WaitAll(task);
- //}
+ if (folder.ParentId != rootFolder.Id)
+ {
+ folder.ParentId = rootFolder.Id;
+ var task = folder.UpdateToRepository(ItemUpdateType.MetadataImport, CancellationToken.None);
+ Task.WaitAll(task);
+ }
rootFolder.AddVirtualChild(folder);