RecordingInfoDto.cs 9.0 KB

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