update special folders

This commit is contained in:
Luke Pulverenti 2015-10-30 12:40:47 -04:00
parent 23d65f4871
commit bed740668c
3 changed files with 13 additions and 8 deletions

View File

@ -128,7 +128,7 @@ namespace MediaBrowser.Controller.Entities
/// <returns>IEnumerable{BaseItem}.</returns> /// <returns>IEnumerable{BaseItem}.</returns>
protected override IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService) protected override IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService)
{ {
return base.GetNonCachedChildren(directoryService); return base.GetNonCachedChildren(directoryService).Concat(_virtualChildren);
} }
/// <summary> /// <summary>

View File

@ -55,13 +55,18 @@ namespace MediaBrowser.Controller.Entities
} }
} }
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
{
return base.GetEligibleChildrenForRecursiveChildren(user).Concat(LibraryManager.RootFolder.VirtualChildren);
}
/// <summary> /// <summary>
/// Get the children of this folder from the actual file system /// Get the children of this folder from the actual file system
/// </summary> /// </summary>
/// <returns>IEnumerable{BaseItem}.</returns> /// <returns>IEnumerable{BaseItem}.</returns>
protected override IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService) protected override IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService)
{ {
return base.GetNonCachedChildren(directoryService).Concat(LibraryManager.RootFolder.VirtualChildren); return base.GetNonCachedChildren(directoryService);
} }
public override bool BeforeMetadataRefresh() public override bool BeforeMetadataRefresh()

View File

@ -727,12 +727,12 @@ namespace MediaBrowser.Server.Implementations.Library
folder = dbItem; folder = dbItem;
} }
//if (folder.ParentId != rootFolder.Id) if (folder.ParentId != rootFolder.Id)
//{ {
// folder.ParentId = rootFolder.Id; folder.ParentId = rootFolder.Id;
// var task = folder.UpdateToRepository(ItemUpdateType.MetadataImport, CancellationToken.None); var task = folder.UpdateToRepository(ItemUpdateType.MetadataImport, CancellationToken.None);
// Task.WaitAll(task); Task.WaitAll(task);
//} }
rootFolder.AddVirtualChild(folder); rootFolder.AddVirtualChild(folder);