DTOBaseItem.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Model.Entities;
  4. namespace MediaBrowser.Model.DTO
  5. {
  6. public class DTOBaseItem : IHasProviderIds
  7. {
  8. public string Name { get; set; }
  9. public Guid Id { get; set; }
  10. public DateTime DateCreated { get; set; }
  11. public string SortName { get; set; }
  12. public DateTime? PremiereDate { get; set; }
  13. public string Path { get; set; }
  14. public string OfficialRating { get; set; }
  15. public string Overview { get; set; }
  16. public IEnumerable<string> Taglines { get; set; }
  17. public IEnumerable<string> Genres { get; set; }
  18. public string DisplayMediaType { get; set; }
  19. public float? UserRating { get; set; }
  20. public long? RunTimeTicks { get; set; }
  21. public string AspectRatio { get; set; }
  22. public int? ProductionYear { get; set; }
  23. public int? IndexNumber { get; set; }
  24. public string TrailerUrl { get; set; }
  25. public Dictionary<string, string> ProviderIds { get; set; }
  26. public bool HasBanner { get; set; }
  27. public bool HasArt { get; set; }
  28. public bool HasLogo { get; set; }
  29. public bool HasThumb { get; set; }
  30. public bool HasPrimaryImage { get; set; }
  31. public int BackdropCount { get; set; }
  32. public IEnumerable<DTOBaseItem> Children { get; set; }
  33. public bool IsFolder { get; set; }
  34. public Guid? ParentId { get; set; }
  35. public string Type { get; set; }
  36. public IEnumerable<BaseItemPerson> People { get; set; }
  37. public IEnumerable<BaseItemStudio> Studios { get; set; }
  38. /// <summary>
  39. /// If the item does not have a logo, this will hold the Id of the Parent that has one.
  40. /// </summary>
  41. public Guid? ParentLogoItemId { get; set; }
  42. /// <summary>
  43. /// If the item does not have any backdrops, this will hold the Id of the Parent that has one.
  44. /// </summary>
  45. public Guid? ParentBackdropItemId { get; set; }
  46. public int? ParentBackdropCount { get; set; }
  47. public IEnumerable<Video> LocalTrailers { get; set; }
  48. public int LocalTrailerCount { get; set; }
  49. /// <summary>
  50. /// User data for this item based on the user it's being requested for
  51. /// </summary>
  52. public UserItemData UserData { get; set; }
  53. public ItemSpecialCounts SpecialCounts { get; set; }
  54. public bool IsType(Type type)
  55. {
  56. return IsType(type.Name);
  57. }
  58. public bool IsType(string type)
  59. {
  60. return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
  61. }
  62. }
  63. }