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>
protected override IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService)
{
return base.GetNonCachedChildren(directoryService);
return base.GetNonCachedChildren(directoryService).Concat(_virtualChildren);
}
/// <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>
/// Get the children of this folder from the actual file system
/// </summary>
/// <returns>IEnumerable{BaseItem}.</returns>
protected override IEnumerable<BaseItem> GetNonCachedChildren(IDirectoryService directoryService)
{
return base.GetNonCachedChildren(directoryService).Concat(LibraryManager.RootFolder.VirtualChildren);
return base.GetNonCachedChildren(directoryService);
}
public override bool BeforeMetadataRefresh()

View File

@ -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);