#nullable disable #pragma warning disable CA2227, CS1591 using System; using System.Collections.Generic; using Jellyfin.Data.Enums; using MediaBrowser.Model.Entities; namespace MediaBrowser.Controller.Entities { /// /// This is a small Person stub that is attached to BaseItems. /// public sealed class PersonInfo : IHasProviderIds { public PersonInfo() { ProviderIds = new Dictionary(StringComparer.OrdinalIgnoreCase); } public Guid ItemId { get; set; } /// /// Gets or sets the name. /// /// The name. public string Name { get; set; } /// /// Gets or sets the role. /// /// The role. public string Role { get; set; } /// /// Gets or sets the type. /// /// The type. public PersonKind Type { get; set; } /// /// Gets or sets the ascending sort order. /// /// The sort order. public int? SortOrder { get; set; } public string ImageUrl { get; set; } public Dictionary ProviderIds { get; set; } /// /// Returns a that represents this instance. /// /// A that represents this instance. public override string ToString() { return Name; } public bool IsType(PersonKind type) => Type == type || string.Equals(type.ToString(), Role, StringComparison.OrdinalIgnoreCase); } }