BaseItemDto.cs 33 KB

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