BaseItemPerson.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #nullable disable
  2. using System.Collections.Generic;
  3. using System.Text.Json.Serialization;
  4. using MediaBrowser.Model.Entities;
  5. namespace MediaBrowser.Model.Dto
  6. {
  7. /// <summary>
  8. /// This is used by the api to get information about a Person within a BaseItem.
  9. /// </summary>
  10. public class BaseItemPerson
  11. {
  12. /// <summary>
  13. /// Gets or sets the name.
  14. /// </summary>
  15. /// <value>The name.</value>
  16. public string Name { get; set; }
  17. /// <summary>
  18. /// Gets or sets the identifier.
  19. /// </summary>
  20. /// <value>The identifier.</value>
  21. public string Id { get; set; }
  22. /// <summary>
  23. /// Gets or sets the role.
  24. /// </summary>
  25. /// <value>The role.</value>
  26. public string Role { get; set; }
  27. /// <summary>
  28. /// Gets or sets the type.
  29. /// </summary>
  30. /// <value>The type.</value>
  31. public string Type { get; set; }
  32. /// <summary>
  33. /// Gets or sets the primary image tag.
  34. /// </summary>
  35. /// <value>The primary image tag.</value>
  36. public string PrimaryImageTag { get; set; }
  37. /// <summary>
  38. /// Gets or sets the primary image blurhash.
  39. /// </summary>
  40. /// <value>The primary image blurhash.</value>
  41. public Dictionary<ImageType, Dictionary<string, string>> ImageBlurHashes { get; set; }
  42. /// <summary>
  43. /// Gets a value indicating whether this instance has primary image.
  44. /// </summary>
  45. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  46. [JsonIgnore]
  47. public bool HasPrimaryImage => PrimaryImageTag != null;
  48. }
  49. }