BaseItemDto.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745
  1. using MediaBrowser.Model.Entities;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Runtime.Serialization;
  6. namespace MediaBrowser.Model.Dto
  7. {
  8. /// <summary>
  9. /// This is strictly used as a data transfer object from the api layer.
  10. /// This holds information about a BaseItem in a format that is convenient for the client.
  11. /// </summary>
  12. public class BaseItemDto : IHasProviderIds, INotifyPropertyChanged, IItemDto
  13. {
  14. /// <summary>
  15. /// Gets or sets the name.
  16. /// </summary>
  17. /// <value>The name.</value>
  18. public string Name { get; set; }
  19. /// <summary>
  20. /// Gets or sets the id.
  21. /// </summary>
  22. /// <value>The id.</value>
  23. public string Id { get; set; }
  24. /// <summary>
  25. /// Gets or sets the date created.
  26. /// </summary>
  27. /// <value>The date created.</value>
  28. public DateTime? DateCreated { get; set; }
  29. /// <summary>
  30. /// Gets or sets the name of the sort.
  31. /// </summary>
  32. /// <value>The name of the sort.</value>
  33. public string SortName { get; set; }
  34. public string MainFeaturePlaylistName { get; set; }
  35. /// <summary>
  36. /// Gets or sets the video3 D format.
  37. /// </summary>
  38. /// <value>The video3 D format.</value>
  39. public Video3DFormat? Video3DFormat { get; set; }
  40. /// <summary>
  41. /// Gets or sets the premiere date.
  42. /// </summary>
  43. /// <value>The premiere date.</value>
  44. public DateTime? PremiereDate { get; set; }
  45. /// <summary>
  46. /// Gets or sets the critic rating.
  47. /// </summary>
  48. /// <value>The critic rating.</value>
  49. public float? CriticRating { get; set; }
  50. /// <summary>
  51. /// Gets or sets the game system.
  52. /// </summary>
  53. /// <value>The game system.</value>
  54. public string GameSystem { get; set; }
  55. /// <summary>
  56. /// Gets or sets the critic rating summary.
  57. /// </summary>
  58. /// <value>The critic rating summary.</value>
  59. public string CriticRatingSummary { get; set; }
  60. /// <summary>
  61. /// Gets or sets the path.
  62. /// </summary>
  63. /// <value>The path.</value>
  64. public string Path { get; set; }
  65. /// <summary>
  66. /// Gets or sets the official rating.
  67. /// </summary>
  68. /// <value>The official rating.</value>
  69. public string OfficialRating { get; set; }
  70. /// <summary>
  71. /// Gets or sets the custom rating.
  72. /// </summary>
  73. /// <value>The custom rating.</value>
  74. public string CustomRating { get; set; }
  75. /// <summary>
  76. /// Gets or sets the overview.
  77. /// </summary>
  78. /// <value>The overview.</value>
  79. public string Overview { get; set; }
  80. /// <summary>
  81. /// Gets or sets the taglines.
  82. /// </summary>
  83. /// <value>The taglines.</value>
  84. public List<string> Taglines { get; set; }
  85. /// <summary>
  86. /// Gets or sets the genres.
  87. /// </summary>
  88. /// <value>The genres.</value>
  89. public List<string> Genres { get; set; }
  90. /// <summary>
  91. /// Gets or sets the community rating.
  92. /// </summary>
  93. /// <value>The community rating.</value>
  94. public float? CommunityRating { get; set; }
  95. /// <summary>
  96. /// Gets or sets the original run time ticks.
  97. /// </summary>
  98. /// <value>The original run time ticks.</value>
  99. public long? OriginalRunTimeTicks { get; set; }
  100. /// <summary>
  101. /// Gets or sets the cumulative run time ticks.
  102. /// </summary>
  103. /// <value>The cumulative run time ticks.</value>
  104. public long? CumulativeRunTimeTicks { get; set; }
  105. /// <summary>
  106. /// Gets or sets the run time ticks.
  107. /// </summary>
  108. /// <value>The run time ticks.</value>
  109. public long? RunTimeTicks { get; set; }
  110. /// <summary>
  111. /// Gets or sets the aspect ratio.
  112. /// </summary>
  113. /// <value>The aspect ratio.</value>
  114. public string AspectRatio { get; set; }
  115. /// <summary>
  116. /// Gets or sets the production year.
  117. /// </summary>
  118. /// <value>The production year.</value>
  119. public int? ProductionYear { get; set; }
  120. public int? SeasonCount { get; set; }
  121. /// <summary>
  122. /// Gets or sets the players supported by a game.
  123. /// </summary>
  124. /// <value>The players.</value>
  125. public int? Players { get; set; }
  126. /// <summary>
  127. /// Gets or sets the index number.
  128. /// </summary>
  129. /// <value>The index number.</value>
  130. public int? IndexNumber { get; set; }
  131. /// <summary>
  132. /// Gets or sets the index number end.
  133. /// </summary>
  134. /// <value>The index number end.</value>
  135. public int? IndexNumberEnd { get; set; }
  136. /// <summary>
  137. /// Gets or sets the parent index number.
  138. /// </summary>
  139. /// <value>The parent index number.</value>
  140. public int? ParentIndexNumber { get; set; }
  141. /// <summary>
  142. /// Gets or sets the trailer urls.
  143. /// </summary>
  144. /// <value>The trailer urls.</value>
  145. public List<MediaUrl> RemoteTrailers { get; set; }
  146. /// <summary>
  147. /// Gets or sets the soundtrack ids.
  148. /// </summary>
  149. /// <value>The soundtrack ids.</value>
  150. public string[] SoundtrackIds { get; set; }
  151. /// <summary>
  152. /// Gets or sets the provider ids.
  153. /// </summary>
  154. /// <value>The provider ids.</value>
  155. public Dictionary<string, string> ProviderIds { get; set; }
  156. /// <summary>
  157. /// Gets or sets the language.
  158. /// </summary>
  159. /// <value>The language.</value>
  160. public string Language { get; set; }
  161. /// <summary>
  162. /// Gets or sets a value indicating whether this instance is folder.
  163. /// </summary>
  164. /// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
  165. public bool IsFolder { get; set; }
  166. /// <summary>
  167. /// Gets or sets the parent id.
  168. /// </summary>
  169. /// <value>The parent id.</value>
  170. public string ParentId { get; set; }
  171. /// <summary>
  172. /// Gets or sets the type.
  173. /// </summary>
  174. /// <value>The type.</value>
  175. public string Type { get; set; }
  176. /// <summary>
  177. /// Gets or sets the people.
  178. /// </summary>
  179. /// <value>The people.</value>
  180. public BaseItemPerson[] People { get; set; }
  181. /// <summary>
  182. /// Gets or sets the studios.
  183. /// </summary>
  184. /// <value>The studios.</value>
  185. public StudioDto[] Studios { get; set; }
  186. /// <summary>
  187. /// If the item does not have a logo, this will hold the Id of the Parent that has one.
  188. /// </summary>
  189. /// <value>The parent logo item id.</value>
  190. public string ParentLogoItemId { get; set; }
  191. /// <summary>
  192. /// If the item does not have any backdrops, this will hold the Id of the Parent that has one.
  193. /// </summary>
  194. /// <value>The parent backdrop item id.</value>
  195. public string ParentBackdropItemId { get; set; }
  196. /// <summary>
  197. /// Gets or sets the parent backdrop image tags.
  198. /// </summary>
  199. /// <value>The parent backdrop image tags.</value>
  200. public List<Guid> ParentBackdropImageTags { get; set; }
  201. /// <summary>
  202. /// Gets or sets the local trailer count.
  203. /// </summary>
  204. /// <value>The local trailer count.</value>
  205. public int? LocalTrailerCount { get; set; }
  206. /// <summary>
  207. /// User data for this item based on the user it's being requested for
  208. /// </summary>
  209. /// <value>The user data.</value>
  210. public UserItemDataDto UserData { get; set; }
  211. /// <summary>
  212. /// Gets or sets the recently added item count.
  213. /// </summary>
  214. /// <value>The recently added item count.</value>
  215. public int? RecentlyAddedItemCount { get; set; }
  216. /// <summary>
  217. /// Gets or sets the played percentage.
  218. /// </summary>
  219. /// <value>The played percentage.</value>
  220. public double? PlayedPercentage { get; set; }
  221. /// <summary>
  222. /// Gets or sets the recursive item count.
  223. /// </summary>
  224. /// <value>The recursive item count.</value>
  225. public int? RecursiveItemCount { get; set; }
  226. /// <summary>
  227. /// Gets or sets the recursive unplayed item count.
  228. /// </summary>
  229. /// <value>The recursive unplayed item count.</value>
  230. public int? RecursiveUnplayedItemCount { get; set; }
  231. /// <summary>
  232. /// Gets or sets the child count.
  233. /// </summary>
  234. /// <value>The child count.</value>
  235. public int? ChildCount { get; set; }
  236. /// <summary>
  237. /// Gets or sets the name of the series.
  238. /// </summary>
  239. /// <value>The name of the series.</value>
  240. public string SeriesName { get; set; }
  241. /// <summary>
  242. /// Gets or sets the series id.
  243. /// </summary>
  244. /// <value>The series id.</value>
  245. public string SeriesId { get; set; }
  246. /// <summary>
  247. /// Gets or sets the special feature count.
  248. /// </summary>
  249. /// <value>The special feature count.</value>
  250. public int? SpecialFeatureCount { get; set; }
  251. /// <summary>
  252. /// Gets or sets the display preferences id.
  253. /// </summary>
  254. /// <value>The display preferences id.</value>
  255. public string DisplayPreferencesId { get; set; }
  256. /// <summary>
  257. /// Gets or sets the status.
  258. /// </summary>
  259. /// <value>The status.</value>
  260. public SeriesStatus? Status { get; set; }
  261. /// <summary>
  262. /// Gets or sets the air time.
  263. /// </summary>
  264. /// <value>The air time.</value>
  265. public string AirTime { get; set; }
  266. /// <summary>
  267. /// Gets or sets the air days.
  268. /// </summary>
  269. /// <value>The air days.</value>
  270. public List<DayOfWeek> AirDays { get; set; }
  271. /// <summary>
  272. /// Gets or sets the index options.
  273. /// </summary>
  274. /// <value>The index options.</value>
  275. public string[] IndexOptions { get; set; }
  276. /// <summary>
  277. /// Gets or sets the tags.
  278. /// </summary>
  279. /// <value>The tags.</value>
  280. public List<string> Tags { get; set; }
  281. /// <summary>
  282. /// Gets or sets the primary image aspect ratio, after image enhancements.
  283. /// </summary>
  284. /// <value>The primary image aspect ratio.</value>
  285. public double? PrimaryImageAspectRatio { get; set; }
  286. /// <summary>
  287. /// Gets or sets the primary image aspect ratio, before image enhancements.
  288. /// </summary>
  289. /// <value>The original primary image aspect ratio.</value>
  290. public double? OriginalPrimaryImageAspectRatio { get; set; }
  291. /// <summary>
  292. /// Gets or sets the artists.
  293. /// </summary>
  294. /// <value>The artists.</value>
  295. public string[] Artists { get; set; }
  296. /// <summary>
  297. /// Gets or sets the album.
  298. /// </summary>
  299. /// <value>The album.</value>
  300. public string Album { get; set; }
  301. /// <summary>
  302. /// Gets or sets the album id.
  303. /// </summary>
  304. /// <value>The album id.</value>
  305. public string AlbumId { get; set; }
  306. /// <summary>
  307. /// Gets or sets the album image tag.
  308. /// </summary>
  309. /// <value>The album image tag.</value>
  310. public Guid? AlbumPrimaryImageTag { get; set; }
  311. /// <summary>
  312. /// Gets or sets the album artist.
  313. /// </summary>
  314. /// <value>The album artist.</value>
  315. public string AlbumArtist { get; set; }
  316. /// <summary>
  317. /// Gets or sets the media streams.
  318. /// </summary>
  319. /// <value>The media streams.</value>
  320. public List<MediaStream> MediaStreams { get; set; }
  321. /// <summary>
  322. /// Gets or sets the type of the video.
  323. /// </summary>
  324. /// <value>The type of the video.</value>
  325. public VideoType? VideoType { get; set; }
  326. /// <summary>
  327. /// Gets or sets the display type of the media.
  328. /// </summary>
  329. /// <value>The display type of the media.</value>
  330. public string DisplayMediaType { get; set; }
  331. /// <summary>
  332. /// Gets or sets the part count.
  333. /// </summary>
  334. /// <value>The part count.</value>
  335. public int? PartCount { get; set; }
  336. /// <summary>
  337. /// Determines whether the specified type is type.
  338. /// </summary>
  339. /// <param name="type">The type.</param>
  340. /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
  341. public bool IsType(Type type)
  342. {
  343. return IsType(type.Name);
  344. }
  345. /// <summary>
  346. /// Determines whether the specified type is type.
  347. /// </summary>
  348. /// <param name="type">The type.</param>
  349. /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns>
  350. public bool IsType(string type)
  351. {
  352. return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
  353. }
  354. /// <summary>
  355. /// Gets or sets the image tags.
  356. /// </summary>
  357. /// <value>The image tags.</value>
  358. public Dictionary<ImageType, Guid> ImageTags { get; set; }
  359. /// <summary>
  360. /// Gets or sets the backdrop image tags.
  361. /// </summary>
  362. /// <value>The backdrop image tags.</value>
  363. public List<Guid> BackdropImageTags { get; set; }
  364. /// <summary>
  365. /// Gets or sets the screenshot image tags.
  366. /// </summary>
  367. /// <value>The screenshot image tags.</value>
  368. public List<Guid> ScreenshotImageTags { get; set; }
  369. /// <summary>
  370. /// Gets or sets the parent logo image tag.
  371. /// </summary>
  372. /// <value>The parent logo image tag.</value>
  373. public Guid? ParentLogoImageTag { get; set; }
  374. /// <summary>
  375. /// If the item does not have a art, this will hold the Id of the Parent that has one.
  376. /// </summary>
  377. /// <value>The parent art item id.</value>
  378. public string ParentArtItemId { get; set; }
  379. /// <summary>
  380. /// Gets or sets the parent art image tag.
  381. /// </summary>
  382. /// <value>The parent art image tag.</value>
  383. public Guid? ParentArtImageTag { get; set; }
  384. /// <summary>
  385. /// Gets or sets the chapters.
  386. /// </summary>
  387. /// <value>The chapters.</value>
  388. public List<ChapterInfoDto> Chapters { get; set; }
  389. /// <summary>
  390. /// Gets or sets the type of the location.
  391. /// </summary>
  392. /// <value>The type of the location.</value>
  393. public LocationType LocationType { get; set; }
  394. /// <summary>
  395. /// Gets or sets the type of the iso.
  396. /// </summary>
  397. /// <value>The type of the iso.</value>
  398. public IsoType? IsoType { get; set; }
  399. /// <summary>
  400. /// Gets or sets the type of the media.
  401. /// </summary>
  402. /// <value>The type of the media.</value>
  403. public string MediaType { get; set; }
  404. /// <summary>
  405. /// Gets or sets the overview HTML.
  406. /// </summary>
  407. /// <value>The overview HTML.</value>
  408. public string OverviewHtml { get; set; }
  409. /// <summary>
  410. /// Gets or sets the end date.
  411. /// </summary>
  412. /// <value>The end date.</value>
  413. public DateTime? EndDate { get; set; }
  414. /// <summary>
  415. /// Gets or sets the home page URL.
  416. /// </summary>
  417. /// <value>The home page URL.</value>
  418. public string HomePageUrl { get; set; }
  419. /// <summary>
  420. /// Gets or sets the production locations.
  421. /// </summary>
  422. /// <value>The production locations.</value>
  423. public List<string> ProductionLocations { get; set; }
  424. /// <summary>
  425. /// Gets or sets the budget.
  426. /// </summary>
  427. /// <value>The budget.</value>
  428. public double? Budget { get; set; }
  429. /// <summary>
  430. /// Gets or sets the revenue.
  431. /// </summary>
  432. /// <value>The revenue.</value>
  433. public double? Revenue { get; set; }
  434. /// <summary>
  435. /// Gets or sets the locked fields.
  436. /// </summary>
  437. /// <value>The locked fields.</value>
  438. public List<MetadataFields> LockedFields { get; set; }
  439. /// <summary>
  440. /// Gets or sets a value indicating whether [enable internet providers].
  441. /// </summary>
  442. /// <value><c>true</c> if [enable internet providers]; otherwise, <c>false</c>.</value>
  443. public bool? EnableInternetProviders { get; set; }
  444. /// <summary>
  445. /// Gets a value indicating whether this instance can resume.
  446. /// </summary>
  447. /// <value><c>true</c> if this instance can resume; otherwise, <c>false</c>.</value>
  448. [IgnoreDataMember]
  449. public bool CanResume
  450. {
  451. get { return UserData != null && UserData.PlaybackPositionTicks > 0; }
  452. }
  453. /// <summary>
  454. /// Gets the resume position ticks.
  455. /// </summary>
  456. /// <value>The resume position ticks.</value>
  457. [IgnoreDataMember]
  458. public long ResumePositionTicks
  459. {
  460. get { return UserData == null ? 0 : UserData.PlaybackPositionTicks; }
  461. }
  462. /// <summary>
  463. /// Gets the backdrop count.
  464. /// </summary>
  465. /// <value>The backdrop count.</value>
  466. [IgnoreDataMember]
  467. public int BackdropCount
  468. {
  469. get { return BackdropImageTags == null ? 0 : BackdropImageTags.Count; }
  470. }
  471. /// <summary>
  472. /// Gets the screenshot count.
  473. /// </summary>
  474. /// <value>The screenshot count.</value>
  475. [IgnoreDataMember]
  476. public int ScreenshotCount
  477. {
  478. get { return ScreenshotImageTags == null ? 0 : ScreenshotImageTags.Count; }
  479. }
  480. /// <summary>
  481. /// Gets a value indicating whether this instance has banner.
  482. /// </summary>
  483. /// <value><c>true</c> if this instance has banner; otherwise, <c>false</c>.</value>
  484. [IgnoreDataMember]
  485. public bool HasBanner
  486. {
  487. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Banner); }
  488. }
  489. /// <summary>
  490. /// Gets a value indicating whether this instance has art.
  491. /// </summary>
  492. /// <value><c>true</c> if this instance has art; otherwise, <c>false</c>.</value>
  493. [IgnoreDataMember]
  494. public bool HasArtImage
  495. {
  496. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Art); }
  497. }
  498. /// <summary>
  499. /// Gets a value indicating whether this instance has logo.
  500. /// </summary>
  501. /// <value><c>true</c> if this instance has logo; otherwise, <c>false</c>.</value>
  502. [IgnoreDataMember]
  503. public bool HasLogo
  504. {
  505. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Logo); }
  506. }
  507. /// <summary>
  508. /// Gets a value indicating whether this instance has thumb.
  509. /// </summary>
  510. /// <value><c>true</c> if this instance has thumb; otherwise, <c>false</c>.</value>
  511. [IgnoreDataMember]
  512. public bool HasThumb
  513. {
  514. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Thumb); }
  515. }
  516. /// <summary>
  517. /// Gets a value indicating whether this instance has primary image.
  518. /// </summary>
  519. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  520. [IgnoreDataMember]
  521. public bool HasPrimaryImage
  522. {
  523. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
  524. }
  525. /// <summary>
  526. /// Gets a value indicating whether this instance has disc image.
  527. /// </summary>
  528. /// <value><c>true</c> if this instance has disc image; otherwise, <c>false</c>.</value>
  529. [IgnoreDataMember]
  530. public bool HasDiscImage
  531. {
  532. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Disc); }
  533. }
  534. /// <summary>
  535. /// Gets a value indicating whether this instance has box image.
  536. /// </summary>
  537. /// <value><c>true</c> if this instance has box image; otherwise, <c>false</c>.</value>
  538. [IgnoreDataMember]
  539. public bool HasBoxImage
  540. {
  541. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Box); }
  542. }
  543. /// <summary>
  544. /// Gets a value indicating whether this instance has box image.
  545. /// </summary>
  546. /// <value><c>true</c> if this instance has box image; otherwise, <c>false</c>.</value>
  547. [IgnoreDataMember]
  548. public bool HasBoxRearImage
  549. {
  550. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.BoxRear); }
  551. }
  552. /// <summary>
  553. /// Gets a value indicating whether this instance has menu image.
  554. /// </summary>
  555. /// <value><c>true</c> if this instance has menu image; otherwise, <c>false</c>.</value>
  556. [IgnoreDataMember]
  557. public bool HasMenuImage
  558. {
  559. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Menu); }
  560. }
  561. /// <summary>
  562. /// Gets a value indicating whether this instance is video.
  563. /// </summary>
  564. /// <value><c>true</c> if this instance is video; otherwise, <c>false</c>.</value>
  565. [IgnoreDataMember]
  566. public bool IsVideo
  567. {
  568. get { return string.Equals(MediaType, Entities.MediaType.Video, StringComparison.OrdinalIgnoreCase); }
  569. }
  570. /// <summary>
  571. /// Gets a value indicating whether this instance is audio.
  572. /// </summary>
  573. /// <value><c>true</c> if this instance is audio; otherwise, <c>false</c>.</value>
  574. [IgnoreDataMember]
  575. public bool IsAudio
  576. {
  577. get { return string.Equals(MediaType, Entities.MediaType.Audio, StringComparison.OrdinalIgnoreCase); }
  578. }
  579. /// <summary>
  580. /// Gets a value indicating whether this instance is game.
  581. /// </summary>
  582. /// <value><c>true</c> if this instance is game; otherwise, <c>false</c>.</value>
  583. [IgnoreDataMember]
  584. public bool IsGame
  585. {
  586. get { return string.Equals(MediaType, Entities.MediaType.Game, StringComparison.OrdinalIgnoreCase); }
  587. }
  588. /// <summary>
  589. /// Gets a value indicating whether this instance is person.
  590. /// </summary>
  591. /// <value><c>true</c> if this instance is person; otherwise, <c>false</c>.</value>
  592. [IgnoreDataMember]
  593. public bool IsPerson
  594. {
  595. get { return string.Equals(Type, "Person", StringComparison.OrdinalIgnoreCase); }
  596. }
  597. /// <summary>
  598. /// Gets a value indicating whether this instance is root.
  599. /// </summary>
  600. /// <value><c>true</c> if this instance is root; otherwise, <c>false</c>.</value>
  601. [IgnoreDataMember]
  602. public bool IsRoot
  603. {
  604. get { return string.Equals(Type, "AggregateFolder", StringComparison.OrdinalIgnoreCase); }
  605. }
  606. [IgnoreDataMember]
  607. public bool IsMusicGenre
  608. {
  609. get { return string.Equals(Type, "MusicGenre", StringComparison.OrdinalIgnoreCase); }
  610. }
  611. [IgnoreDataMember]
  612. public bool IsGameGenre
  613. {
  614. get { return string.Equals(Type, "GameGenre", StringComparison.OrdinalIgnoreCase); }
  615. }
  616. [IgnoreDataMember]
  617. public bool IsGenre
  618. {
  619. get { return string.Equals(Type, "Genre", StringComparison.OrdinalIgnoreCase); }
  620. }
  621. [IgnoreDataMember]
  622. public bool IsArtist
  623. {
  624. get { return string.Equals(Type, "Artist", StringComparison.OrdinalIgnoreCase); }
  625. }
  626. [IgnoreDataMember]
  627. public bool IsStudio
  628. {
  629. get { return string.Equals(Type, "Studio", StringComparison.OrdinalIgnoreCase); }
  630. }
  631. /// <summary>
  632. /// Occurs when [property changed].
  633. /// </summary>
  634. public event PropertyChangedEventHandler PropertyChanged;
  635. }
  636. }