BaseItemPerson.cs 1.7 KB

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