ServerItem.cs 949 B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma warning disable CS1591
  2. using MediaBrowser.Controller.Entities;
  3. namespace Emby.Dlna.ContentDirectory
  4. {
  5. /// <summary>
  6. /// Defines the <see cref="ServerItem" />.
  7. /// </summary>
  8. internal class ServerItem
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="ServerItem"/> class.
  12. /// </summary>
  13. /// <param name="item">The <see cref="BaseItem"/>.</param>
  14. public ServerItem(BaseItem item)
  15. {
  16. Item = item;
  17. if (item is IItemByName && item is not Folder)
  18. {
  19. StubType = Dlna.ContentDirectory.StubType.Folder;
  20. }
  21. }
  22. /// <summary>
  23. /// Gets or sets the underlying base item.
  24. /// </summary>
  25. public BaseItem Item { get; set; }
  26. /// <summary>
  27. /// Gets or sets the DLNA item type.
  28. /// </summary>
  29. public StubType? StubType { get; set; }
  30. }
  31. }