RecordingInfoDto.cs 9.0 KB

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