BaseItemDto.cs 33 KB

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