BaseItemDto.cs 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  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 community rating.
  159. /// </summary>
  160. /// <value>The community rating.</value>
  161. public float? CommunityRating { get; set; }
  162. /// <summary>
  163. /// Gets or sets the vote count.
  164. /// </summary>
  165. /// <value>The vote count.</value>
  166. public int? VoteCount { get; set; }
  167. /// <summary>
  168. /// Gets or sets the cumulative run time ticks.
  169. /// </summary>
  170. /// <value>The cumulative run time ticks.</value>
  171. public long? CumulativeRunTimeTicks { get; set; }
  172. /// <summary>
  173. /// Gets or sets the original run time ticks.
  174. /// </summary>
  175. /// <value>The original run time ticks.</value>
  176. public long? OriginalRunTimeTicks { get; set; }
  177. /// <summary>
  178. /// Gets or sets the run time ticks.
  179. /// </summary>
  180. /// <value>The run time ticks.</value>
  181. public long? RunTimeTicks { get; set; }
  182. /// <summary>
  183. /// Gets or sets the play access.
  184. /// </summary>
  185. /// <value>The play access.</value>
  186. public PlayAccess PlayAccess { get; set; }
  187. /// <summary>
  188. /// Gets or sets the aspect ratio.
  189. /// </summary>
  190. /// <value>The aspect ratio.</value>
  191. public string AspectRatio { get; set; }
  192. /// <summary>
  193. /// Gets or sets the production year.
  194. /// </summary>
  195. /// <value>The production year.</value>
  196. public int? ProductionYear { get; set; }
  197. /// <summary>
  198. /// Gets or sets the recursive unplayed item count.
  199. /// </summary>
  200. /// <value>The recursive unplayed item count.</value>
  201. [Obsolete]
  202. public int? RecursiveUnplayedItemCount { 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 recursive item count.
  305. /// </summary>
  306. /// <value>The recursive item count.</value>
  307. public int? RecursiveItemCount { get; set; }
  308. /// <summary>
  309. /// Gets or sets the child count.
  310. /// </summary>
  311. /// <value>The child count.</value>
  312. public int? ChildCount { get; set; }
  313. /// <summary>
  314. /// Gets or sets the name of the series.
  315. /// </summary>
  316. /// <value>The name of the series.</value>
  317. public string SeriesName { get; set; }
  318. /// <summary>
  319. /// Gets or sets the series id.
  320. /// </summary>
  321. /// <value>The series id.</value>
  322. public string SeriesId { get; set; }
  323. /// <summary>
  324. /// Gets or sets the season identifier.
  325. /// </summary>
  326. /// <value>The season identifier.</value>
  327. public string SeasonId { get; set; }
  328. /// <summary>
  329. /// Gets or sets the special feature count.
  330. /// </summary>
  331. /// <value>The special feature count.</value>
  332. public int? SpecialFeatureCount { get; set; }
  333. /// <summary>
  334. /// Gets or sets the display preferences id.
  335. /// </summary>
  336. /// <value>The display preferences id.</value>
  337. public string DisplayPreferencesId { get; set; }
  338. /// <summary>
  339. /// Gets or sets the status.
  340. /// </summary>
  341. /// <value>The status.</value>
  342. public SeriesStatus? Status { get; set; }
  343. /// <summary>
  344. /// Gets or sets the air time.
  345. /// </summary>
  346. /// <value>The air time.</value>
  347. public string AirTime { get; set; }
  348. /// <summary>
  349. /// Gets or sets the air days.
  350. /// </summary>
  351. /// <value>The air days.</value>
  352. public List<DayOfWeek> AirDays { get; set; }
  353. /// <summary>
  354. /// Gets or sets the index options.
  355. /// </summary>
  356. /// <value>The index options.</value>
  357. public string[] IndexOptions { get; set; }
  358. /// <summary>
  359. /// Gets or sets the tags.
  360. /// </summary>
  361. /// <value>The tags.</value>
  362. public List<string> Tags { get; set; }
  363. /// <summary>
  364. /// Gets or sets the keywords.
  365. /// </summary>
  366. /// <value>The keywords.</value>
  367. public List<string> Keywords { get; set; }
  368. /// <summary>
  369. /// Gets or sets the primary image aspect ratio, after image enhancements.
  370. /// </summary>
  371. /// <value>The primary image aspect ratio.</value>
  372. public double? PrimaryImageAspectRatio { get; set; }
  373. /// <summary>
  374. /// Gets or sets the primary image aspect ratio, before image enhancements.
  375. /// </summary>
  376. /// <value>The original primary image aspect ratio.</value>
  377. public double? OriginalPrimaryImageAspectRatio { get; set; }
  378. /// <summary>
  379. /// Gets or sets the artists.
  380. /// </summary>
  381. /// <value>The artists.</value>
  382. public List<string> Artists { get; set; }
  383. /// <summary>
  384. /// Gets or sets the album.
  385. /// </summary>
  386. /// <value>The album.</value>
  387. public string Album { get; set; }
  388. /// <summary>
  389. /// Gets or sets the type of the collection.
  390. /// </summary>
  391. /// <value>The type of the collection.</value>
  392. public string CollectionType { get; set; }
  393. /// <summary>
  394. /// Gets or sets the display order.
  395. /// </summary>
  396. /// <value>The display order.</value>
  397. public string DisplayOrder { get; set; }
  398. /// <summary>
  399. /// Gets or sets the album id.
  400. /// </summary>
  401. /// <value>The album id.</value>
  402. public string AlbumId { get; set; }
  403. /// <summary>
  404. /// Gets or sets the album image tag.
  405. /// </summary>
  406. /// <value>The album image tag.</value>
  407. public string AlbumPrimaryImageTag { get; set; }
  408. /// <summary>
  409. /// Gets or sets the series primary image tag.
  410. /// </summary>
  411. /// <value>The series primary image tag.</value>
  412. public string SeriesPrimaryImageTag { get; set; }
  413. /// <summary>
  414. /// Gets or sets the album artist.
  415. /// </summary>
  416. /// <value>The album artist.</value>
  417. public string AlbumArtist { get; set; }
  418. /// <summary>
  419. /// Gets or sets the name of the season.
  420. /// </summary>
  421. /// <value>The name of the season.</value>
  422. public string SeasonName { get; set; }
  423. /// <summary>
  424. /// Gets or sets the media streams.
  425. /// </summary>
  426. /// <value>The media streams.</value>
  427. public List<MediaStream> MediaStreams { get; set; }
  428. /// <summary>
  429. /// Gets or sets the type of the video.
  430. /// </summary>
  431. /// <value>The type of the video.</value>
  432. public VideoType? VideoType { get; set; }
  433. /// <summary>
  434. /// Gets or sets the display type of the media.
  435. /// </summary>
  436. /// <value>The display type of the media.</value>
  437. public string DisplayMediaType { get; set; }
  438. /// <summary>
  439. /// Gets or sets the part count.
  440. /// </summary>
  441. /// <value>The part count.</value>
  442. public int? PartCount { get; set; }
  443. public int? MediaSourceCount { get; set; }
  444. /// <summary>
  445. /// Determines whether the specified type is type.
  446. /// </summary>
  447. /// <param name="type">The type.</param>
  448. /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
  449. public bool IsType(Type type)
  450. {
  451. return IsType(type.Name);
  452. }
  453. /// <summary>
  454. /// Gets or sets a value indicating whether [supports playlists].
  455. /// </summary>
  456. /// <value><c>true</c> if [supports playlists]; otherwise, <c>false</c>.</value>
  457. public bool SupportsPlaylists { get; set; }
  458. /// <summary>
  459. /// Determines whether the specified type is type.
  460. /// </summary>
  461. /// <param name="type">The type.</param>
  462. /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
  463. public bool IsType(string type)
  464. {
  465. return StringHelper.EqualsIgnoreCase(Type, type);
  466. }
  467. /// <summary>
  468. /// Gets or sets the image tags.
  469. /// </summary>
  470. /// <value>The image tags.</value>
  471. public Dictionary<ImageType, string> ImageTags { get; set; }
  472. /// <summary>
  473. /// Gets or sets the backdrop image tags.
  474. /// </summary>
  475. /// <value>The backdrop image tags.</value>
  476. public List<string> BackdropImageTags { get; set; }
  477. /// <summary>
  478. /// Gets or sets the screenshot image tags.
  479. /// </summary>
  480. /// <value>The screenshot image tags.</value>
  481. public List<string> ScreenshotImageTags { get; set; }
  482. /// <summary>
  483. /// Gets or sets the parent logo image tag.
  484. /// </summary>
  485. /// <value>The parent logo image tag.</value>
  486. public string ParentLogoImageTag { get; set; }
  487. /// <summary>
  488. /// If the item does not have a art, this will hold the Id of the Parent that has one.
  489. /// </summary>
  490. /// <value>The parent art item id.</value>
  491. public string ParentArtItemId { get; set; }
  492. /// <summary>
  493. /// Gets or sets the parent art image tag.
  494. /// </summary>
  495. /// <value>The parent art image tag.</value>
  496. public string ParentArtImageTag { get; set; }
  497. /// <summary>
  498. /// Gets or sets the series thumb image tag.
  499. /// </summary>
  500. /// <value>The series thumb image tag.</value>
  501. public string SeriesThumbImageTag { get; set; }
  502. /// <summary>
  503. /// Gets or sets the series studio.
  504. /// </summary>
  505. /// <value>The series studio.</value>
  506. public string SeriesStudio { get; set; }
  507. /// <summary>
  508. /// Gets or sets the parent thumb item id.
  509. /// </summary>
  510. /// <value>The parent thumb item id.</value>
  511. public string ParentThumbItemId { get; set; }
  512. /// <summary>
  513. /// Gets or sets the parent thumb image tag.
  514. /// </summary>
  515. /// <value>The parent thumb image tag.</value>
  516. public string ParentThumbImageTag { get; set; }
  517. /// <summary>
  518. /// Gets or sets the parent primary image item identifier.
  519. /// </summary>
  520. /// <value>The parent primary image item identifier.</value>
  521. public string ParentPrimaryImageItemId { get; set; }
  522. /// <summary>
  523. /// Gets or sets the parent primary image tag.
  524. /// </summary>
  525. /// <value>The parent primary image tag.</value>
  526. public string ParentPrimaryImageTag { get; set; }
  527. /// <summary>
  528. /// Gets or sets the chapters.
  529. /// </summary>
  530. /// <value>The chapters.</value>
  531. public List<ChapterInfoDto> Chapters { get; set; }
  532. /// <summary>
  533. /// Gets or sets the type of the location.
  534. /// </summary>
  535. /// <value>The type of the location.</value>
  536. public LocationType LocationType { get; set; }
  537. /// <summary>
  538. /// Gets or sets the type of the iso.
  539. /// </summary>
  540. /// <value>The type of the iso.</value>
  541. public IsoType? IsoType { get; set; }
  542. /// <summary>
  543. /// Gets or sets the type of the media.
  544. /// </summary>
  545. /// <value>The type of the media.</value>
  546. public string MediaType { get; set; }
  547. /// <summary>
  548. /// Gets or sets the end date.
  549. /// </summary>
  550. /// <value>The end date.</value>
  551. public DateTime? EndDate { get; set; }
  552. /// <summary>
  553. /// Gets or sets the home page URL.
  554. /// </summary>
  555. /// <value>The home page URL.</value>
  556. public string HomePageUrl { get; set; }
  557. /// <summary>
  558. /// Gets or sets the production locations.
  559. /// </summary>
  560. /// <value>The production locations.</value>
  561. public List<string> ProductionLocations { get; set; }
  562. /// <summary>
  563. /// Gets or sets the budget.
  564. /// </summary>
  565. /// <value>The budget.</value>
  566. public double? Budget { get; set; }
  567. /// <summary>
  568. /// Gets or sets the revenue.
  569. /// </summary>
  570. /// <value>The revenue.</value>
  571. public double? Revenue { get; set; }
  572. /// <summary>
  573. /// Gets or sets the locked fields.
  574. /// </summary>
  575. /// <value>The locked fields.</value>
  576. public List<MetadataFields> LockedFields { get; set; }
  577. /// <summary>
  578. /// Gets or sets the movie count.
  579. /// </summary>
  580. /// <value>The movie count.</value>
  581. public int? MovieCount { get; set; }
  582. /// <summary>
  583. /// Gets or sets the series count.
  584. /// </summary>
  585. /// <value>The series count.</value>
  586. public int? SeriesCount { get; set; }
  587. /// <summary>
  588. /// Gets or sets the episode count.
  589. /// </summary>
  590. /// <value>The episode count.</value>
  591. public int? EpisodeCount { get; set; }
  592. /// <summary>
  593. /// Gets or sets the game count.
  594. /// </summary>
  595. /// <value>The game count.</value>
  596. public int? GameCount { get; set; }
  597. /// <summary>
  598. /// Gets or sets the trailer count.
  599. /// </summary>
  600. /// <value>The trailer count.</value>
  601. public int? TrailerCount { get; set; }
  602. /// <summary>
  603. /// Gets or sets the song count.
  604. /// </summary>
  605. /// <value>The song count.</value>
  606. public int? SongCount { get; set; }
  607. /// <summary>
  608. /// Gets or sets the album count.
  609. /// </summary>
  610. /// <value>The album count.</value>
  611. public int? AlbumCount { get; set; }
  612. /// <summary>
  613. /// Gets or sets the music video count.
  614. /// </summary>
  615. /// <value>The music video count.</value>
  616. public int? MusicVideoCount { get; set; }
  617. /// <summary>
  618. /// Gets or sets a value indicating whether [enable internet providers].
  619. /// </summary>
  620. /// <value><c>true</c> if [enable internet providers]; otherwise, <c>false</c>.</value>
  621. public bool? LockData { get; set; }
  622. public int? Width { get; set; }
  623. public int? Height { get; set; }
  624. public string CameraMake { get; set; }
  625. public string CameraModel { get; set; }
  626. public string Software { get; set; }
  627. public double? ExposureTime { get; set; }
  628. public double? FocalLength { get; set; }
  629. public ImageOrientation? ImageOrientation { get; set; }
  630. public double? Aperture { get; set; }
  631. public double? ShutterSpeed { get; set; }
  632. public double? Latitude { get; set; }
  633. public double? Longitude { get; set; }
  634. public double? Altitude { get; set; }
  635. public int? IsoSpeedRating { get; set; }
  636. /// <summary>
  637. /// Gets a value indicating whether this instance can resume.
  638. /// </summary>
  639. /// <value><c>true</c> if this instance can resume; otherwise, <c>false</c>.</value>
  640. [IgnoreDataMember]
  641. public bool CanResume
  642. {
  643. get { return UserData != null && UserData.PlaybackPositionTicks > 0; }
  644. }
  645. /// <summary>
  646. /// Gets the resume position ticks.
  647. /// </summary>
  648. /// <value>The resume position ticks.</value>
  649. [IgnoreDataMember]
  650. public long ResumePositionTicks
  651. {
  652. get { return UserData == null ? 0 : UserData.PlaybackPositionTicks; }
  653. }
  654. /// <summary>
  655. /// Gets the backdrop count.
  656. /// </summary>
  657. /// <value>The backdrop count.</value>
  658. [IgnoreDataMember]
  659. public int BackdropCount
  660. {
  661. get { return BackdropImageTags == null ? 0 : BackdropImageTags.Count; }
  662. }
  663. /// <summary>
  664. /// Gets the screenshot count.
  665. /// </summary>
  666. /// <value>The screenshot count.</value>
  667. [IgnoreDataMember]
  668. public int ScreenshotCount
  669. {
  670. get { return ScreenshotImageTags == null ? 0 : ScreenshotImageTags.Count; }
  671. }
  672. /// <summary>
  673. /// Gets a value indicating whether this instance has banner.
  674. /// </summary>
  675. /// <value><c>true</c> if this instance has banner; otherwise, <c>false</c>.</value>
  676. [IgnoreDataMember]
  677. public bool HasBanner
  678. {
  679. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Banner); }
  680. }
  681. /// <summary>
  682. /// Gets a value indicating whether this instance has art.
  683. /// </summary>
  684. /// <value><c>true</c> if this instance has art; otherwise, <c>false</c>.</value>
  685. [IgnoreDataMember]
  686. public bool HasArtImage
  687. {
  688. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Art); }
  689. }
  690. /// <summary>
  691. /// Gets a value indicating whether this instance has logo.
  692. /// </summary>
  693. /// <value><c>true</c> if this instance has logo; otherwise, <c>false</c>.</value>
  694. [IgnoreDataMember]
  695. public bool HasLogo
  696. {
  697. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Logo); }
  698. }
  699. /// <summary>
  700. /// Gets a value indicating whether this instance has thumb.
  701. /// </summary>
  702. /// <value><c>true</c> if this instance has thumb; otherwise, <c>false</c>.</value>
  703. [IgnoreDataMember]
  704. public bool HasThumb
  705. {
  706. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Thumb); }
  707. }
  708. /// <summary>
  709. /// Gets a value indicating whether this instance has primary image.
  710. /// </summary>
  711. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  712. [IgnoreDataMember]
  713. public bool HasPrimaryImage
  714. {
  715. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
  716. }
  717. /// <summary>
  718. /// Gets a value indicating whether this instance has disc image.
  719. /// </summary>
  720. /// <value><c>true</c> if this instance has disc image; otherwise, <c>false</c>.</value>
  721. [IgnoreDataMember]
  722. public bool HasDiscImage
  723. {
  724. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Disc); }
  725. }
  726. /// <summary>
  727. /// Gets a value indicating whether this instance has box image.
  728. /// </summary>
  729. /// <value><c>true</c> if this instance has box image; otherwise, <c>false</c>.</value>
  730. [IgnoreDataMember]
  731. public bool HasBoxImage
  732. {
  733. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Box); }
  734. }
  735. /// <summary>
  736. /// Gets a value indicating whether this instance has box image.
  737. /// </summary>
  738. /// <value><c>true</c> if this instance has box image; otherwise, <c>false</c>.</value>
  739. [IgnoreDataMember]
  740. public bool HasBoxRearImage
  741. {
  742. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.BoxRear); }
  743. }
  744. /// <summary>
  745. /// Gets a value indicating whether this instance has menu image.
  746. /// </summary>
  747. /// <value><c>true</c> if this instance has menu image; otherwise, <c>false</c>.</value>
  748. [IgnoreDataMember]
  749. public bool HasMenuImage
  750. {
  751. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Menu); }
  752. }
  753. /// <summary>
  754. /// Gets a value indicating whether this instance is video.
  755. /// </summary>
  756. /// <value><c>true</c> if this instance is video; otherwise, <c>false</c>.</value>
  757. [IgnoreDataMember]
  758. public bool IsVideo
  759. {
  760. get { return StringHelper.EqualsIgnoreCase(MediaType, MediaBrowser.Model.Entities.MediaType.Video); }
  761. }
  762. /// <summary>
  763. /// Gets a value indicating whether this instance is audio.
  764. /// </summary>
  765. /// <value><c>true</c> if this instance is audio; otherwise, <c>false</c>.</value>
  766. [IgnoreDataMember]
  767. public bool IsAudio
  768. {
  769. get { return StringHelper.EqualsIgnoreCase(MediaType, MediaBrowser.Model.Entities.MediaType.Audio); }
  770. }
  771. /// <summary>
  772. /// Gets a value indicating whether this instance is game.
  773. /// </summary>
  774. /// <value><c>true</c> if this instance is game; otherwise, <c>false</c>.</value>
  775. [IgnoreDataMember]
  776. public bool IsGame
  777. {
  778. get { return StringHelper.EqualsIgnoreCase(MediaType, MediaBrowser.Model.Entities.MediaType.Game); }
  779. }
  780. /// <summary>
  781. /// Gets a value indicating whether this instance is person.
  782. /// </summary>
  783. /// <value><c>true</c> if this instance is person; otherwise, <c>false</c>.</value>
  784. [IgnoreDataMember]
  785. public bool IsPerson
  786. {
  787. get { return StringHelper.EqualsIgnoreCase(Type, "Person"); }
  788. }
  789. /// <summary>
  790. /// Gets a value indicating whether this instance is root.
  791. /// </summary>
  792. /// <value><c>true</c> if this instance is root; otherwise, <c>false</c>.</value>
  793. [IgnoreDataMember]
  794. public bool IsRoot
  795. {
  796. get { return StringHelper.EqualsIgnoreCase(Type, "AggregateFolder"); }
  797. }
  798. [IgnoreDataMember]
  799. public bool IsMusicGenre
  800. {
  801. get { return StringHelper.EqualsIgnoreCase(Type, "MusicGenre"); }
  802. }
  803. [IgnoreDataMember]
  804. public bool IsGameGenre
  805. {
  806. get { return StringHelper.EqualsIgnoreCase(Type, "GameGenre"); }
  807. }
  808. [IgnoreDataMember]
  809. public bool IsGenre
  810. {
  811. get { return StringHelper.EqualsIgnoreCase(Type, "Genre"); }
  812. }
  813. [IgnoreDataMember]
  814. public bool IsArtist
  815. {
  816. get { return StringHelper.EqualsIgnoreCase(Type, "Artist"); }
  817. }
  818. [IgnoreDataMember]
  819. public bool IsStudio
  820. {
  821. get { return StringHelper.EqualsIgnoreCase(Type, "Studio"); }
  822. }
  823. /// <summary>
  824. /// Occurs when [property changed].
  825. /// </summary>
  826. public event PropertyChangedEventHandler PropertyChanged;
  827. }
  828. }