BaseItemDto.cs 32 KB

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