BaseItemDto.cs 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  1. using MediaBrowser.Model.Drawing;
  2. using MediaBrowser.Model.Entities;
  3. using MediaBrowser.Model.Extensions;
  4. using MediaBrowser.Model.Library;
  5. using MediaBrowser.Model.LiveTv;
  6. using MediaBrowser.Model.Providers;
  7. using MediaBrowser.Model.Sync;
  8. using System;
  9. using System.Collections.Generic;
  10. using System.Diagnostics;
  11. using MediaBrowser.Model.Serialization;
  12. namespace MediaBrowser.Model.Dto
  13. {
  14. /// <summary>
  15. /// This is strictly used as a data transfer object from the api layer.
  16. /// This holds information about a BaseItem in a format that is convenient for the client.
  17. /// </summary>
  18. [DebuggerDisplay("Name = {Name}, ID = {Id}, Type = {Type}")]
  19. public class BaseItemDto : IHasProviderIds, IItemDto, IHasServerId, IHasSyncInfo
  20. {
  21. /// <summary>
  22. /// Gets or sets the name.
  23. /// </summary>
  24. /// <value>The name.</value>
  25. public string Name { get; set; }
  26. public string OriginalTitle { get; set; }
  27. /// <summary>
  28. /// Gets or sets the server identifier.
  29. /// </summary>
  30. /// <value>The server identifier.</value>
  31. public string ServerId { get; set; }
  32. /// <summary>
  33. /// Gets or sets the id.
  34. /// </summary>
  35. /// <value>The id.</value>
  36. public string Id { get; set; }
  37. /// <summary>
  38. /// Gets or sets the etag.
  39. /// </summary>
  40. /// <value>The etag.</value>
  41. public string Etag { get; set; }
  42. /// <summary>
  43. /// Gets or sets the type of the source.
  44. /// </summary>
  45. /// <value>The type of the source.</value>
  46. public string SourceType { get; set; }
  47. /// <summary>
  48. /// Gets or sets the playlist item identifier.
  49. /// </summary>
  50. /// <value>The playlist item identifier.</value>
  51. public string PlaylistItemId { get; set; }
  52. /// <summary>
  53. /// Gets or sets the date created.
  54. /// </summary>
  55. /// <value>The date created.</value>
  56. public DateTime? DateCreated { get; set; }
  57. public DateTime? DateLastMediaAdded { get; set; }
  58. public ExtraType? ExtraType { get; set; }
  59. public int? AirsBeforeSeasonNumber { get; set; }
  60. public int? AirsAfterSeasonNumber { get; set; }
  61. public int? AirsBeforeEpisodeNumber { get; set; }
  62. public int? AbsoluteEpisodeNumber { get; set; }
  63. public bool? DisplaySpecialsWithSeasons { get; set; }
  64. public bool? CanDelete { get; set; }
  65. public bool? CanDownload { get; set; }
  66. public bool? HasSubtitles { get; set; }
  67. public string PreferredMetadataLanguage { get; set; }
  68. public string PreferredMetadataCountryCode { get; set; }
  69. public string AwardSummary { get; set; }
  70. public float? Metascore { get; set; }
  71. /// <summary>
  72. /// Gets or sets a value indicating whether [supports synchronize].
  73. /// </summary>
  74. /// <value><c>null</c> if [supports synchronize] contains no value, <c>true</c> if [supports synchronize]; otherwise, <c>false</c>.</value>
  75. public bool? SupportsSync { get; set; }
  76. /// <summary>
  77. /// Gets or sets a value indicating whether this instance has synchronize job.
  78. /// </summary>
  79. /// <value><c>null</c> if [has synchronize job] contains no value, <c>true</c> if [has synchronize job]; otherwise, <c>false</c>.</value>
  80. public bool? HasSyncJob { get; set; }
  81. /// <summary>
  82. /// Gets or sets a value indicating whether this instance is synced.
  83. /// </summary>
  84. /// <value><c>null</c> if [is synced] contains no value, <c>true</c> if [is synced]; otherwise, <c>false</c>.</value>
  85. public bool? IsSynced { get; set; }
  86. /// <summary>
  87. /// Gets or sets the synchronize status.
  88. /// </summary>
  89. /// <value>The synchronize status.</value>
  90. public SyncJobItemStatus? SyncStatus { get; set; }
  91. /// <summary>
  92. /// Gets or sets the synchronize percent.
  93. /// </summary>
  94. /// <value>The synchronize percent.</value>
  95. public double? SyncPercent { get; set; }
  96. public string Container { get; set; }
  97. /// <summary>
  98. /// Gets or sets the DVD season number.
  99. /// </summary>
  100. /// <value>The DVD season number.</value>
  101. public int? DvdSeasonNumber { get; set; }
  102. /// <summary>
  103. /// Gets or sets the DVD episode number.
  104. /// </summary>
  105. /// <value>The DVD episode number.</value>
  106. public float? DvdEpisodeNumber { get; set; }
  107. /// <summary>
  108. /// Gets or sets the name of the sort.
  109. /// </summary>
  110. /// <value>The name of the sort.</value>
  111. public string SortName { get; set; }
  112. public string ForcedSortName { get; set; }
  113. /// <summary>
  114. /// Gets or sets the video3 D format.
  115. /// </summary>
  116. /// <value>The video3 D format.</value>
  117. public Video3DFormat? Video3DFormat { get; set; }
  118. /// <summary>
  119. /// Gets or sets the premiere date.
  120. /// </summary>
  121. /// <value>The premiere date.</value>
  122. public DateTime? PremiereDate { get; set; }
  123. /// <summary>
  124. /// Gets or sets the external urls.
  125. /// </summary>
  126. /// <value>The external urls.</value>
  127. public ExternalUrl[] ExternalUrls { get; set; }
  128. /// <summary>
  129. /// Gets or sets the media versions.
  130. /// </summary>
  131. /// <value>The media versions.</value>
  132. public List<MediaSourceInfo> MediaSources { get; set; }
  133. /// <summary>
  134. /// Gets or sets the critic rating.
  135. /// </summary>
  136. /// <value>The critic rating.</value>
  137. public float? CriticRating { get; set; }
  138. /// <summary>
  139. /// Gets or sets the game system.
  140. /// </summary>
  141. /// <value>The game system.</value>
  142. public string GameSystem { get; set; }
  143. public string[] ProductionLocations { get; set; }
  144. /// <summary>
  145. /// Gets or sets the critic rating summary.
  146. /// </summary>
  147. /// <value>The critic rating summary.</value>
  148. public string CriticRatingSummary { get; set; }
  149. public List<string> MultiPartGameFiles { get; set; }
  150. /// <summary>
  151. /// Gets or sets the path.
  152. /// </summary>
  153. /// <value>The path.</value>
  154. public string Path { get; set; }
  155. /// <summary>
  156. /// Gets or sets the official rating.
  157. /// </summary>
  158. /// <value>The official rating.</value>
  159. public string OfficialRating { get; set; }
  160. /// <summary>
  161. /// Gets or sets the custom rating.
  162. /// </summary>
  163. /// <value>The custom rating.</value>
  164. public string CustomRating { get; set; }
  165. /// <summary>
  166. /// Gets or sets the channel identifier.
  167. /// </summary>
  168. /// <value>The channel identifier.</value>
  169. public string ChannelId { get; set; }
  170. public string ChannelName { get; set; }
  171. public string ServiceName { get; set; }
  172. /// <summary>
  173. /// Gets or sets the overview.
  174. /// </summary>
  175. /// <value>The overview.</value>
  176. public string Overview { get; set; }
  177. /// <summary>
  178. /// Gets or sets the taglines.
  179. /// </summary>
  180. /// <value>The taglines.</value>
  181. public List<string> Taglines { get; set; }
  182. /// <summary>
  183. /// Gets or sets the genres.
  184. /// </summary>
  185. /// <value>The genres.</value>
  186. public List<string> Genres { get; set; }
  187. /// <summary>
  188. /// Gets or sets the series genres.
  189. /// </summary>
  190. /// <value>The series genres.</value>
  191. public List<string> SeriesGenres { get; set; }
  192. /// <summary>
  193. /// Gets or sets the community rating.
  194. /// </summary>
  195. /// <value>The community rating.</value>
  196. public float? CommunityRating { get; set; }
  197. /// <summary>
  198. /// Gets or sets the vote count.
  199. /// </summary>
  200. /// <value>The vote count.</value>
  201. public int? VoteCount { get; set; }
  202. /// <summary>
  203. /// Gets or sets the cumulative run time ticks.
  204. /// </summary>
  205. /// <value>The cumulative run time ticks.</value>
  206. public long? CumulativeRunTimeTicks { get; set; }
  207. /// <summary>
  208. /// Gets or sets the original run time ticks.
  209. /// </summary>
  210. /// <value>The original run time ticks.</value>
  211. public long? OriginalRunTimeTicks { get; set; }
  212. /// <summary>
  213. /// Gets or sets the run time ticks.
  214. /// </summary>
  215. /// <value>The run time ticks.</value>
  216. public long? RunTimeTicks { get; set; }
  217. /// <summary>
  218. /// Gets or sets the play access.
  219. /// </summary>
  220. /// <value>The play access.</value>
  221. public PlayAccess? PlayAccess { get; set; }
  222. /// <summary>
  223. /// Gets or sets the aspect ratio.
  224. /// </summary>
  225. /// <value>The aspect ratio.</value>
  226. public string AspectRatio { get; set; }
  227. /// <summary>
  228. /// Gets or sets the production year.
  229. /// </summary>
  230. /// <value>The production year.</value>
  231. public int? ProductionYear { get; set; }
  232. /// <summary>
  233. /// Gets or sets the players supported by a game.
  234. /// </summary>
  235. /// <value>The players.</value>
  236. public int? Players { get; set; }
  237. /// <summary>
  238. /// Gets or sets a value indicating whether this instance is place holder.
  239. /// </summary>
  240. /// <value><c>null</c> if [is place holder] contains no value, <c>true</c> if [is place holder]; otherwise, <c>false</c>.</value>
  241. public bool? IsPlaceHolder { get; set; }
  242. /// <summary>
  243. /// Gets or sets the number.
  244. /// </summary>
  245. /// <value>The number.</value>
  246. public string Number { get; set; }
  247. public string ChannelNumber { get; set; }
  248. /// <summary>
  249. /// Gets or sets the index number.
  250. /// </summary>
  251. /// <value>The index number.</value>
  252. public int? IndexNumber { get; set; }
  253. /// <summary>
  254. /// Gets or sets the index number end.
  255. /// </summary>
  256. /// <value>The index number end.</value>
  257. public int? IndexNumberEnd { get; set; }
  258. /// <summary>
  259. /// Gets or sets the parent index number.
  260. /// </summary>
  261. /// <value>The parent index number.</value>
  262. public int? ParentIndexNumber { get; set; }
  263. /// <summary>
  264. /// Gets or sets the trailer urls.
  265. /// </summary>
  266. /// <value>The trailer urls.</value>
  267. public List<MediaUrl> RemoteTrailers { get; set; }
  268. /// <summary>
  269. /// Gets or sets the provider ids.
  270. /// </summary>
  271. /// <value>The provider ids.</value>
  272. public Dictionary<string, string> ProviderIds { get; set; }
  273. /// <summary>
  274. /// Gets or sets a value indicating whether this instance is HD.
  275. /// </summary>
  276. /// <value><c>null</c> if [is HD] contains no value, <c>true</c> if [is HD]; otherwise, <c>false</c>.</value>
  277. public bool? IsHD { get; set; }
  278. /// <summary>
  279. /// Gets or sets a value indicating whether this instance is folder.
  280. /// </summary>
  281. /// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
  282. public bool? IsFolder { get; set; }
  283. /// <summary>
  284. /// Gets or sets the parent id.
  285. /// </summary>
  286. /// <value>The parent id.</value>
  287. public string ParentId { get; set; }
  288. /// <summary>
  289. /// Gets or sets the type.
  290. /// </summary>
  291. /// <value>The type.</value>
  292. public string Type { get; set; }
  293. /// <summary>
  294. /// Gets or sets the people.
  295. /// </summary>
  296. /// <value>The people.</value>
  297. public BaseItemPerson[] People { get; set; }
  298. /// <summary>
  299. /// Gets or sets the studios.
  300. /// </summary>
  301. /// <value>The studios.</value>
  302. public StudioDto[] Studios { get; set; }
  303. /// <summary>
  304. /// If the item does not have a logo, this will hold the Id of the Parent that has one.
  305. /// </summary>
  306. /// <value>The parent logo item id.</value>
  307. public string ParentLogoItemId { get; set; }
  308. /// <summary>
  309. /// If the item does not have any backdrops, this will hold the Id of the Parent that has one.
  310. /// </summary>
  311. /// <value>The parent backdrop item id.</value>
  312. public string ParentBackdropItemId { get; set; }
  313. /// <summary>
  314. /// Gets or sets the parent backdrop image tags.
  315. /// </summary>
  316. /// <value>The parent backdrop image tags.</value>
  317. public List<string> ParentBackdropImageTags { get; set; }
  318. /// <summary>
  319. /// Gets or sets the local trailer count.
  320. /// </summary>
  321. /// <value>The local trailer count.</value>
  322. public int? LocalTrailerCount { get; set; }
  323. /// <summary>
  324. /// User data for this item based on the user it's being requested for
  325. /// </summary>
  326. /// <value>The user data.</value>
  327. public UserItemDataDto UserData { get; set; }
  328. /// <summary>
  329. /// Gets or sets the recursive item count.
  330. /// </summary>
  331. /// <value>The recursive item count.</value>
  332. public int? RecursiveItemCount { get; set; }
  333. /// <summary>
  334. /// Gets or sets the child count.
  335. /// </summary>
  336. /// <value>The child count.</value>
  337. public int? ChildCount { get; set; }
  338. /// <summary>
  339. /// Gets or sets the name of the series.
  340. /// </summary>
  341. /// <value>The name of the series.</value>
  342. public string SeriesName { get; set; }
  343. /// <summary>
  344. /// Gets or sets the series id.
  345. /// </summary>
  346. /// <value>The series id.</value>
  347. public string SeriesId { get; set; }
  348. /// <summary>
  349. /// Gets or sets the season identifier.
  350. /// </summary>
  351. /// <value>The season identifier.</value>
  352. public string SeasonId { get; set; }
  353. /// <summary>
  354. /// Gets or sets the special feature count.
  355. /// </summary>
  356. /// <value>The special feature count.</value>
  357. public int? SpecialFeatureCount { get; set; }
  358. /// <summary>
  359. /// Gets or sets the display preferences id.
  360. /// </summary>
  361. /// <value>The display preferences id.</value>
  362. public string DisplayPreferencesId { get; set; }
  363. /// <summary>
  364. /// Gets or sets the status.
  365. /// </summary>
  366. /// <value>The status.</value>
  367. public string Status { get; set; }
  368. /// <summary>
  369. /// Gets or sets the air time.
  370. /// </summary>
  371. /// <value>The air time.</value>
  372. public string AirTime { get; set; }
  373. /// <summary>
  374. /// Gets or sets the air days.
  375. /// </summary>
  376. /// <value>The air days.</value>
  377. public List<DayOfWeek> AirDays { get; set; }
  378. /// <summary>
  379. /// Gets or sets the tags.
  380. /// </summary>
  381. /// <value>The tags.</value>
  382. public List<string> Tags { get; set; }
  383. /// <summary>
  384. /// Gets or sets the keywords.
  385. /// </summary>
  386. /// <value>The keywords.</value>
  387. public List<string> Keywords { get; set; }
  388. /// <summary>
  389. /// Gets or sets the primary image aspect ratio, after image enhancements.
  390. /// </summary>
  391. /// <value>The primary image aspect ratio.</value>
  392. public double? PrimaryImageAspectRatio { get; set; }
  393. /// <summary>
  394. /// Gets or sets the artists.
  395. /// </summary>
  396. /// <value>The artists.</value>
  397. public List<string> Artists { get; set; }
  398. /// <summary>
  399. /// Gets or sets the artist items.
  400. /// </summary>
  401. /// <value>The artist items.</value>
  402. public List<NameIdPair> ArtistItems { get; set; }
  403. /// <summary>
  404. /// Gets or sets the album.
  405. /// </summary>
  406. /// <value>The album.</value>
  407. public string Album { get; set; }
  408. /// <summary>
  409. /// Gets or sets the type of the collection.
  410. /// </summary>
  411. /// <value>The type of the collection.</value>
  412. public string CollectionType { get; set; }
  413. /// <summary>
  414. /// Gets or sets the display order.
  415. /// </summary>
  416. /// <value>The display order.</value>
  417. public string DisplayOrder { get; set; }
  418. /// <summary>
  419. /// Gets or sets the album id.
  420. /// </summary>
  421. /// <value>The album id.</value>
  422. public string AlbumId { get; set; }
  423. /// <summary>
  424. /// Gets or sets the album image tag.
  425. /// </summary>
  426. /// <value>The album image tag.</value>
  427. public string AlbumPrimaryImageTag { get; set; }
  428. /// <summary>
  429. /// Gets or sets the series primary image tag.
  430. /// </summary>
  431. /// <value>The series primary image tag.</value>
  432. public string SeriesPrimaryImageTag { get; set; }
  433. /// <summary>
  434. /// Gets or sets the album artist.
  435. /// </summary>
  436. /// <value>The album artist.</value>
  437. public string AlbumArtist { get; set; }
  438. /// <summary>
  439. /// Gets or sets the album artists.
  440. /// </summary>
  441. /// <value>The album artists.</value>
  442. public List<NameIdPair> AlbumArtists { get; set; }
  443. /// <summary>
  444. /// Gets or sets the name of the season.
  445. /// </summary>
  446. /// <value>The name of the season.</value>
  447. public string SeasonName { get; set; }
  448. /// <summary>
  449. /// Gets or sets the media streams.
  450. /// </summary>
  451. /// <value>The media streams.</value>
  452. public List<MediaStream> MediaStreams { get; set; }
  453. /// <summary>
  454. /// Gets or sets the type of the video.
  455. /// </summary>
  456. /// <value>The type of the video.</value>
  457. public VideoType? VideoType { get; set; }
  458. /// <summary>
  459. /// Gets or sets the display type of the media.
  460. /// </summary>
  461. /// <value>The display type of the media.</value>
  462. public string DisplayMediaType { get; set; }
  463. /// <summary>
  464. /// Gets or sets the part count.
  465. /// </summary>
  466. /// <value>The part count.</value>
  467. public int? PartCount { get; set; }
  468. public int? MediaSourceCount { get; set; }
  469. /// <summary>
  470. /// Determines whether the specified type is type.
  471. /// </summary>
  472. /// <param name="type">The type.</param>
  473. /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
  474. public bool IsType(Type type)
  475. {
  476. return IsType(type.Name);
  477. }
  478. /// <summary>
  479. /// Determines whether the specified type is type.
  480. /// </summary>
  481. /// <param name="type">The type.</param>
  482. /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
  483. public bool IsType(string type)
  484. {
  485. return StringHelper.EqualsIgnoreCase(Type, type);
  486. }
  487. /// <summary>
  488. /// Gets or sets the image tags.
  489. /// </summary>
  490. /// <value>The image tags.</value>
  491. public Dictionary<ImageType, string> ImageTags { get; set; }
  492. /// <summary>
  493. /// Gets or sets the backdrop image tags.
  494. /// </summary>
  495. /// <value>The backdrop image tags.</value>
  496. public List<string> BackdropImageTags { get; set; }
  497. /// <summary>
  498. /// Gets or sets the screenshot image tags.
  499. /// </summary>
  500. /// <value>The screenshot image tags.</value>
  501. public List<string> ScreenshotImageTags { get; set; }
  502. /// <summary>
  503. /// Gets or sets the parent logo image tag.
  504. /// </summary>
  505. /// <value>The parent logo image tag.</value>
  506. public string ParentLogoImageTag { get; set; }
  507. /// <summary>
  508. /// If the item does not have a art, this will hold the Id of the Parent that has one.
  509. /// </summary>
  510. /// <value>The parent art item id.</value>
  511. public string ParentArtItemId { get; set; }
  512. /// <summary>
  513. /// Gets or sets the parent art image tag.
  514. /// </summary>
  515. /// <value>The parent art image tag.</value>
  516. public string ParentArtImageTag { get; set; }
  517. /// <summary>
  518. /// Gets or sets the series thumb image tag.
  519. /// </summary>
  520. /// <value>The series thumb image tag.</value>
  521. public string SeriesThumbImageTag { get; set; }
  522. /// <summary>
  523. /// Gets or sets the series studio.
  524. /// </summary>
  525. /// <value>The series studio.</value>
  526. public string SeriesStudio { get; set; }
  527. public StudioDto SeriesStudioInfo { get; set; }
  528. /// <summary>
  529. /// Gets or sets the parent thumb item id.
  530. /// </summary>
  531. /// <value>The parent thumb item id.</value>
  532. public string ParentThumbItemId { get; set; }
  533. /// <summary>
  534. /// Gets or sets the parent thumb image tag.
  535. /// </summary>
  536. /// <value>The parent thumb image tag.</value>
  537. public string ParentThumbImageTag { get; set; }
  538. /// <summary>
  539. /// Gets or sets the parent primary image item identifier.
  540. /// </summary>
  541. /// <value>The parent primary image item identifier.</value>
  542. public string ParentPrimaryImageItemId { get; set; }
  543. /// <summary>
  544. /// Gets or sets the parent primary image tag.
  545. /// </summary>
  546. /// <value>The parent primary image tag.</value>
  547. public string ParentPrimaryImageTag { get; set; }
  548. /// <summary>
  549. /// Gets or sets the chapters.
  550. /// </summary>
  551. /// <value>The chapters.</value>
  552. public List<ChapterInfoDto> Chapters { get; set; }
  553. /// <summary>
  554. /// Gets or sets the type of the location.
  555. /// </summary>
  556. /// <value>The type of the location.</value>
  557. public LocationType? LocationType { get; set; }
  558. /// <summary>
  559. /// Gets or sets the type of the iso.
  560. /// </summary>
  561. /// <value>The type of the iso.</value>
  562. public IsoType? IsoType { get; set; }
  563. /// <summary>
  564. /// Gets or sets the type of the media.
  565. /// </summary>
  566. /// <value>The type of the media.</value>
  567. public string MediaType { get; set; }
  568. /// <summary>
  569. /// Gets or sets the end date.
  570. /// </summary>
  571. /// <value>The end date.</value>
  572. public DateTime? EndDate { get; set; }
  573. /// <summary>
  574. /// Gets or sets the home page URL.
  575. /// </summary>
  576. /// <value>The home page URL.</value>
  577. public string HomePageUrl { get; set; }
  578. /// <summary>
  579. /// Gets or sets the locked fields.
  580. /// </summary>
  581. /// <value>The locked fields.</value>
  582. public List<MetadataFields> LockedFields { get; set; }
  583. /// <summary>
  584. /// Gets or sets the trailer count.
  585. /// </summary>
  586. /// <value>The trailer count.</value>
  587. public int? TrailerCount { get; set; }
  588. /// <summary>
  589. /// Gets or sets the movie count.
  590. /// </summary>
  591. /// <value>The movie count.</value>
  592. public int? MovieCount { get; set; }
  593. /// <summary>
  594. /// Gets or sets the series count.
  595. /// </summary>
  596. /// <value>The series count.</value>
  597. public int? SeriesCount { get; set; }
  598. public int? ProgramCount { get; set; }
  599. /// <summary>
  600. /// Gets or sets the episode count.
  601. /// </summary>
  602. /// <value>The episode count.</value>
  603. public int? EpisodeCount { get; set; }
  604. /// <summary>
  605. /// Gets or sets the game count.
  606. /// </summary>
  607. /// <value>The game count.</value>
  608. public int? GameCount { get; set; }
  609. /// <summary>
  610. /// Gets or sets the song count.
  611. /// </summary>
  612. /// <value>The song count.</value>
  613. public int? SongCount { get; set; }
  614. /// <summary>
  615. /// Gets or sets the album count.
  616. /// </summary>
  617. /// <value>The album count.</value>
  618. public int? AlbumCount { get; set; }
  619. public int? ArtistCount { get; set; }
  620. /// <summary>
  621. /// Gets or sets the music video count.
  622. /// </summary>
  623. /// <value>The music video count.</value>
  624. public int? MusicVideoCount { get; set; }
  625. /// <summary>
  626. /// Gets or sets a value indicating whether [enable internet providers].
  627. /// </summary>
  628. /// <value><c>true</c> if [enable internet providers]; otherwise, <c>false</c>.</value>
  629. public bool? LockData { get; set; }
  630. public int? Width { get; set; }
  631. public int? Height { get; set; }
  632. public string CameraMake { get; set; }
  633. public string CameraModel { get; set; }
  634. public string Software { get; set; }
  635. public double? ExposureTime { get; set; }
  636. public double? FocalLength { get; set; }
  637. public ImageOrientation? ImageOrientation { get; set; }
  638. public double? Aperture { get; set; }
  639. public double? ShutterSpeed { get; set; }
  640. public double? Latitude { get; set; }
  641. public double? Longitude { get; set; }
  642. public double? Altitude { get; set; }
  643. public int? IsoSpeedRating { get; set; }
  644. /// <summary>
  645. /// Used by RecordingGroup
  646. /// </summary>
  647. public int? RecordingCount { get; set; }
  648. /// <summary>
  649. /// Gets or sets the series timer identifier.
  650. /// </summary>
  651. /// <value>The series timer identifier.</value>
  652. public string SeriesTimerId { get; set; }
  653. /// <summary>
  654. /// Gets a value indicating whether this instance has art.
  655. /// </summary>
  656. /// <value><c>true</c> if this instance has art; otherwise, <c>false</c>.</value>
  657. [IgnoreDataMember]
  658. public bool HasArtImage
  659. {
  660. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Art); }
  661. }
  662. /// <summary>
  663. /// Gets a value indicating whether this instance has logo.
  664. /// </summary>
  665. /// <value><c>true</c> if this instance has logo; otherwise, <c>false</c>.</value>
  666. [IgnoreDataMember]
  667. public bool HasLogo
  668. {
  669. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Logo); }
  670. }
  671. /// <summary>
  672. /// Gets a value indicating whether this instance has thumb.
  673. /// </summary>
  674. /// <value><c>true</c> if this instance has thumb; otherwise, <c>false</c>.</value>
  675. [IgnoreDataMember]
  676. public bool HasThumb
  677. {
  678. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Thumb); }
  679. }
  680. /// <summary>
  681. /// Gets a value indicating whether this instance has thumb.
  682. /// </summary>
  683. /// <value><c>true</c> if this instance has thumb; otherwise, <c>false</c>.</value>
  684. [IgnoreDataMember]
  685. public bool HasBackdrop
  686. {
  687. get { return (BackdropImageTags != null && BackdropImageTags.Count > 0) || (ParentBackdropImageTags != null && ParentBackdropImageTags.Count > 0); }
  688. }
  689. /// <summary>
  690. /// Gets a value indicating whether this instance has primary image.
  691. /// </summary>
  692. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  693. [IgnoreDataMember]
  694. public bool HasPrimaryImage
  695. {
  696. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
  697. }
  698. /// <summary>
  699. /// Gets a value indicating whether this instance is video.
  700. /// </summary>
  701. /// <value><c>true</c> if this instance is video; otherwise, <c>false</c>.</value>
  702. [IgnoreDataMember]
  703. public bool IsVideo
  704. {
  705. get { return StringHelper.EqualsIgnoreCase(MediaType, Entities.MediaType.Video); }
  706. }
  707. /// <summary>
  708. /// Gets or sets the program identifier.
  709. /// </summary>
  710. /// <value>The program identifier.</value>
  711. public string ProgramId { get; set; }
  712. /// <summary>
  713. /// Gets or sets the channel primary image tag.
  714. /// </summary>
  715. /// <value>The channel primary image tag.</value>
  716. public string ChannelPrimaryImageTag { get; set; }
  717. /// <summary>
  718. /// The start date of the recording, in UTC.
  719. /// </summary>
  720. public DateTime? StartDate { get; set; }
  721. /// <summary>
  722. /// Gets or sets the completion percentage.
  723. /// </summary>
  724. /// <value>The completion percentage.</value>
  725. public double? CompletionPercentage { get; set; }
  726. /// <summary>
  727. /// Gets or sets a value indicating whether this instance is repeat.
  728. /// </summary>
  729. /// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value>
  730. public bool? IsRepeat { get; set; }
  731. /// <summary>
  732. /// Gets or sets the episode title.
  733. /// </summary>
  734. /// <value>The episode title.</value>
  735. public string EpisodeTitle { get; set; }
  736. /// <summary>
  737. /// Gets or sets the type of the channel.
  738. /// </summary>
  739. /// <value>The type of the channel.</value>
  740. public ChannelType? ChannelType { get; set; }
  741. /// <summary>
  742. /// Gets or sets the audio.
  743. /// </summary>
  744. /// <value>The audio.</value>
  745. public ProgramAudio? Audio { get; set; }
  746. /// <summary>
  747. /// Gets or sets a value indicating whether this instance is movie.
  748. /// </summary>
  749. /// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>
  750. public bool? IsMovie { get; set; }
  751. /// <summary>
  752. /// Gets or sets a value indicating whether this instance is sports.
  753. /// </summary>
  754. /// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
  755. public bool? IsSports { get; set; }
  756. /// <summary>
  757. /// Gets or sets a value indicating whether this instance is series.
  758. /// </summary>
  759. /// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>
  760. public bool? IsSeries { get; set; }
  761. /// <summary>
  762. /// Gets or sets a value indicating whether this instance is live.
  763. /// </summary>
  764. /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
  765. public bool? IsLive { get; set; }
  766. /// <summary>
  767. /// Gets or sets a value indicating whether this instance is news.
  768. /// </summary>
  769. /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
  770. public bool? IsNews { get; set; }
  771. /// <summary>
  772. /// Gets or sets a value indicating whether this instance is kids.
  773. /// </summary>
  774. /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
  775. public bool? IsKids { get; set; }
  776. /// <summary>
  777. /// Gets or sets a value indicating whether this instance is premiere.
  778. /// </summary>
  779. /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
  780. public bool? IsPremiere { get; set; }
  781. /// <summary>
  782. /// Gets or sets the timer identifier.
  783. /// </summary>
  784. /// <value>The timer identifier.</value>
  785. public string TimerId { get; set; }
  786. /// <summary>
  787. /// Gets or sets the current program.
  788. /// </summary>
  789. /// <value>The current program.</value>
  790. public BaseItemDto CurrentProgram { get; set; }
  791. }
  792. }