using System.Collections.Generic; using System.Text.Json.Serialization; using MediaBrowser.Model.Dto; namespace Jellyfin.Plugin.Simkl.API.Objects { /// /// Simkl show. /// public class SimklShow : SimklMediaObject { /// /// Initializes a new instance of the class. /// /// The media info. public SimklShow(BaseItemDto mediaInfo) { Title = mediaInfo.SeriesName; Ids = new SimklShowIds(mediaInfo.ProviderIds); Year = mediaInfo.ProductionYear; Seasons = new[] { new Season { Number = mediaInfo.ParentIndexNumber, Episodes = new[] { new ShowEpisode { Number = mediaInfo.IndexNumber } } } }; } /// /// Gets or sets title. /// [JsonPropertyName("title")] public string Title { get; set; } /// /// Gets or sets year. /// [JsonPropertyName("year")] public int? Year { get; set; } /// /// Gets or sets seasons. /// [JsonPropertyName("seasons")] public IReadOnlyList Seasons { get; set; } } }