RecordingInfoDto.cs 8.5 KB

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