BaseItemDto.cs 33 KB

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