BaseItemDto.cs 33 KB

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