RecordingInfoDto.cs 9.2 KB

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