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