ProgramInfoDto.cs 7.4 KB

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