RecordingInfoDto.cs 8.2 KB

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