UserRootFolder.cs 728 B

123456789101112131415161718192021
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. namespace MediaBrowser.Controller.Entities
  4. {
  5. /// <summary>
  6. /// Special class used for User Roots. Children contain actual ones defined for this user
  7. /// PLUS the virtual folders from the physical root (added by plug-ins).
  8. /// </summary>
  9. public class UserRootFolder : Folder
  10. {
  11. /// <summary>
  12. /// Get the children of this folder from the actual file system
  13. /// </summary>
  14. /// <returns>IEnumerable{BaseItem}.</returns>
  15. protected override IEnumerable<BaseItem> GetNonCachedChildren()
  16. {
  17. return base.GetNonCachedChildren().Concat(Kernel.Instance.RootFolder.VirtualChildren);
  18. }
  19. }
  20. }