ProgramInfoDto.cs 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. using System.ComponentModel;
  2. using System.Diagnostics;
  3. using System.Runtime.Serialization;
  4. using MediaBrowser.Model.Dto;
  5. using MediaBrowser.Model.Entities;
  6. using System;
  7. using System.Collections.Generic;
  8. using MediaBrowser.Model.Extensions;
  9. using MediaBrowser.Model.Library;
  10. namespace MediaBrowser.Model.LiveTv
  11. {
  12. [DebuggerDisplay("Name = {Name}, StartTime = {StartDate}, EndTime = {EndDate}")]
  13. public class ProgramInfoDto : IHasPropertyChangedEvent, IItemDto
  14. {
  15. /// <summary>
  16. /// Id of the program.
  17. /// </summary>
  18. public string Id { get; set; }
  19. /// <summary>
  20. /// Gets or sets the primary image aspect ratio.
  21. /// </summary>
  22. /// <value>The primary image aspect ratio.</value>
  23. public double? PrimaryImageAspectRatio { get; set; }
  24. /// <summary>
  25. /// Gets or sets the original primary image aspect ratio.
  26. /// </summary>
  27. /// <value>The original primary image aspect ratio.</value>
  28. public double? OriginalPrimaryImageAspectRatio { 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 timer identifier.
  36. /// </summary>
  37. /// <value>The timer identifier.</value>
  38. public string TimerId { get; set; }
  39. /// <summary>
  40. /// Gets or sets the series timer identifier.
  41. /// </summary>
  42. /// <value>The series timer identifier.</value>
  43. public string SeriesTimerId { get; set; }
  44. /// <summary>
  45. /// Gets or sets the external identifier.
  46. /// </summary>
  47. /// <value>The external identifier.</value>
  48. public string ExternalId { get; set; }
  49. /// <summary>
  50. /// Gets or sets the channel identifier.
  51. /// </summary>
  52. /// <value>The channel identifier.</value>
  53. public string ChannelId { get; set; }
  54. /// <summary>
  55. /// Gets or sets the channel primary image tag.
  56. /// </summary>
  57. /// <value>The channel primary image tag.</value>
  58. public string ChannelPrimaryImageTag { get; set; }
  59. /// <summary>
  60. /// Gets or sets the play access.
  61. /// </summary>
  62. /// <value>The play access.</value>
  63. public PlayAccess PlayAccess { get; set; }
  64. /// <summary>
  65. /// Gets or sets the name of the channel.
  66. /// </summary>
  67. /// <value>The name of the channel.</value>
  68. public string ChannelName { get; set; }
  69. /// <summary>
  70. /// Gets or sets the community rating.
  71. /// </summary>
  72. /// <value>The community rating.</value>
  73. public float? CommunityRating { get; set; }
  74. /// <summary>
  75. /// Gets or sets the official rating.
  76. /// </summary>
  77. /// <value>The official rating.</value>
  78. public string OfficialRating { get; set; }
  79. /// <summary>
  80. /// Gets or sets the name of the service.
  81. /// </summary>
  82. /// <value>The name of the service.</value>
  83. public string ServiceName { get; set; }
  84. /// <summary>
  85. /// Name of the program
  86. /// </summary>
  87. public string Name { get; set; }
  88. /// <summary>
  89. /// Overview of the recording.
  90. /// </summary>
  91. public string Overview { get; set; }
  92. /// <summary>
  93. /// The start date of the program, in UTC.
  94. /// </summary>
  95. public DateTime StartDate { get; set; }
  96. /// <summary>
  97. /// The end date of the program, in UTC.
  98. /// </summary>
  99. public DateTime EndDate { get; set; }
  100. /// <summary>
  101. /// Genre of the program.
  102. /// </summary>
  103. public List<string> Genres { get; set; }
  104. /// <summary>
  105. /// Gets or sets a value indicating whether this instance is hd.
  106. /// </summary>
  107. /// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>
  108. public bool? IsHD { get; set; }
  109. /// <summary>
  110. /// Gets or sets the audio.
  111. /// </summary>
  112. /// <value>The audio.</value>
  113. public ProgramAudio? Audio { get; set; }
  114. /// <summary>
  115. /// Gets or sets the original air date.
  116. /// </summary>
  117. /// <value>The original air date.</value>
  118. public DateTime? OriginalAirDate { get; set; }
  119. /// <summary>
  120. /// Gets or sets a value indicating whether this instance is repeat.
  121. /// </summary>
  122. /// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value>
  123. public bool IsRepeat { get; set; }
  124. /// <summary>
  125. /// Gets or sets the episode title.
  126. /// </summary>
  127. /// <value>The episode title.</value>
  128. public string EpisodeTitle { get; set; }
  129. /// <summary>
  130. /// Gets or sets the image tags.
  131. /// </summary>
  132. /// <value>The image tags.</value>
  133. public Dictionary<ImageType, string> ImageTags { get; set; }
  134. /// <summary>
  135. /// Gets or sets the user data.
  136. /// </summary>
  137. /// <value>The user data.</value>
  138. public UserItemDataDto UserData { get; set; }
  139. /// <summary>
  140. /// Gets or sets a value indicating whether this instance is movie.
  141. /// </summary>
  142. /// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>
  143. public bool IsMovie { get; set; }
  144. /// <summary>
  145. /// Gets or sets a value indicating whether this instance is sports.
  146. /// </summary>
  147. /// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
  148. public bool IsSports { get; set; }
  149. /// <summary>
  150. /// Gets or sets a value indicating whether this instance is series.
  151. /// </summary>
  152. /// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>
  153. public bool IsSeries { get; set; }
  154. /// <summary>
  155. /// Gets or sets a value indicating whether this instance is live.
  156. /// </summary>
  157. /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
  158. public bool IsLive { get; set; }
  159. /// <summary>
  160. /// Gets or sets the type.
  161. /// </summary>
  162. /// <value>The type.</value>
  163. public string Type { get; set; }
  164. /// <summary>
  165. /// Gets or sets the run time ticks.
  166. /// </summary>
  167. /// <value>The run time ticks.</value>
  168. public long? RunTimeTicks { get; set; }
  169. /// <summary>
  170. /// Gets or sets a value indicating whether this instance is news.
  171. /// </summary>
  172. /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
  173. public bool IsNews { get; set; }
  174. /// <summary>
  175. /// Gets or sets a value indicating whether this instance is kids.
  176. /// </summary>
  177. /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
  178. public bool IsKids { get; set; }
  179. /// <summary>
  180. /// Gets or sets a value indicating whether this instance is premiere.
  181. /// </summary>
  182. /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
  183. public bool IsPremiere { get; set; }
  184. /// <summary>
  185. /// Gets a value indicating whether this instance has primary image.
  186. /// </summary>
  187. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  188. [IgnoreDataMember]
  189. public bool HasPrimaryImage
  190. {
  191. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
  192. }
  193. public ProgramInfoDto()
  194. {
  195. Genres = new List<string>();
  196. ImageTags = new Dictionary<ImageType, string>();
  197. }
  198. public event PropertyChangedEventHandler PropertyChanged;
  199. }
  200. }