BaseItemInfo.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. using MediaBrowser.Model.Dto;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using System.Runtime.Serialization;
  6. namespace MediaBrowser.Model.Entities
  7. {
  8. /// <summary>
  9. /// This is a stub class containing only basic information about an item
  10. /// </summary>
  11. [DebuggerDisplay("Name = {Name}, ID = {Id}, Type = {Type}")]
  12. public class BaseItemInfo
  13. {
  14. /// <summary>
  15. /// Gets or sets the name.
  16. /// </summary>
  17. /// <value>The name.</value>
  18. public string Name { get; set; }
  19. /// <summary>
  20. /// Gets or sets the id.
  21. /// </summary>
  22. /// <value>The id.</value>
  23. public string Id { get; set; }
  24. /// <summary>
  25. /// Gets or sets the type.
  26. /// </summary>
  27. /// <value>The type.</value>
  28. public string Type { get; set; }
  29. /// <summary>
  30. /// Gets or sets the type of the media.
  31. /// </summary>
  32. /// <value>The type of the media.</value>
  33. public string MediaType { get; set; }
  34. /// <summary>
  35. /// Gets or sets the run time ticks.
  36. /// </summary>
  37. /// <value>The run time ticks.</value>
  38. public long? RunTimeTicks { get; set; }
  39. /// <summary>
  40. /// Gets or sets the primary image tag.
  41. /// </summary>
  42. /// <value>The primary image tag.</value>
  43. public string PrimaryImageTag { get; set; }
  44. /// <summary>
  45. /// Gets or sets the primary image item identifier.
  46. /// </summary>
  47. /// <value>The primary image item identifier.</value>
  48. public string PrimaryImageItemId { get; set; }
  49. /// <summary>
  50. /// Gets or sets the logo image tag.
  51. /// </summary>
  52. /// <value>The logo image tag.</value>
  53. public string LogoImageTag { get; set; }
  54. /// <summary>
  55. /// Gets or sets the logo item identifier.
  56. /// </summary>
  57. /// <value>The logo item identifier.</value>
  58. public string LogoItemId { get; set; }
  59. /// <summary>
  60. /// Gets or sets the thumb image tag.
  61. /// </summary>
  62. /// <value>The thumb image tag.</value>
  63. public string ThumbImageTag { get; set; }
  64. /// <summary>
  65. /// Gets or sets the thumb item identifier.
  66. /// </summary>
  67. /// <value>The thumb item identifier.</value>
  68. public string ThumbItemId { get; set; }
  69. /// <summary>
  70. /// Gets or sets the thumb image tag.
  71. /// </summary>
  72. /// <value>The thumb image tag.</value>
  73. public string BackdropImageTag { get; set; }
  74. /// <summary>
  75. /// Gets or sets the thumb item identifier.
  76. /// </summary>
  77. /// <value>The thumb item identifier.</value>
  78. public string BackdropItemId { get; set; }
  79. /// <summary>
  80. /// Gets or sets the premiere date.
  81. /// </summary>
  82. /// <value>The premiere date.</value>
  83. public DateTime? PremiereDate { get; set; }
  84. /// <summary>
  85. /// Gets or sets the production year.
  86. /// </summary>
  87. /// <value>The production year.</value>
  88. public int? ProductionYear { get; set; }
  89. /// <summary>
  90. /// Gets or sets the index number.
  91. /// </summary>
  92. /// <value>The index number.</value>
  93. public int? IndexNumber { get; set; }
  94. /// <summary>
  95. /// Gets or sets the index number end.
  96. /// </summary>
  97. /// <value>The index number end.</value>
  98. public int? IndexNumberEnd { get; set; }
  99. /// <summary>
  100. /// Gets or sets the parent index number.
  101. /// </summary>
  102. /// <value>The parent index number.</value>
  103. public int? ParentIndexNumber { get; set; }
  104. /// <summary>
  105. /// Gets or sets the name of the series.
  106. /// </summary>
  107. /// <value>The name of the series.</value>
  108. public string SeriesName { get; set; }
  109. /// <summary>
  110. /// Gets or sets the album.
  111. /// </summary>
  112. /// <value>The album.</value>
  113. public string Album { get; set; }
  114. /// <summary>
  115. /// Gets or sets the artists.
  116. /// </summary>
  117. /// <value>The artists.</value>
  118. public List<string> Artists { get; set; }
  119. /// <summary>
  120. /// Gets or sets the media streams.
  121. /// </summary>
  122. /// <value>The media streams.</value>
  123. public List<MediaStream> MediaStreams { get; set; }
  124. /// <summary>
  125. /// Gets or sets the chapter images item identifier.
  126. /// </summary>
  127. /// <value>The chapter images item identifier.</value>
  128. public string ChapterImagesItemId { get; set; }
  129. /// <summary>
  130. /// Gets or sets the chapters.
  131. /// </summary>
  132. /// <value>The chapters.</value>
  133. public List<ChapterInfoDto> Chapters { get; set; }
  134. /// <summary>
  135. /// Gets a value indicating whether this instance has primary image.
  136. /// </summary>
  137. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  138. [IgnoreDataMember]
  139. public bool HasPrimaryImage
  140. {
  141. get { return PrimaryImageTag != null; }
  142. }
  143. public BaseItemInfo()
  144. {
  145. Artists = new List<string>();
  146. MediaStreams = new List<MediaStream>();
  147. Chapters = new List<ChapterInfoDto>();
  148. }
  149. }
  150. }