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