ProgramInfoDto.cs 7.1 KB

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