BaseItemDto.cs 34 KB

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