Files
AnilistSync/Jellyfin.Plugin.Simkl/API/Objects/SimklShow.cs
T
crobibero d4debbbb18 init
2020-09-08 15:10:57 -06:00

55 lines
1.5 KiB
C#

using MediaBrowser.Model.Dto;
namespace Jellyfin.Plugin.Simkl.API.Objects
{
/// <summary>
/// Simkl show.
/// </summary>
public class SimklShow : SimklMediaObject
{
/// <summary>
/// Initializes a new instance of the <see cref="SimklShow"/> class.
/// </summary>
/// <param name="mediaInfo">The media info.</param>
public SimklShow(BaseItemDto mediaInfo)
{
Title = mediaInfo.SeriesName;
Ids = new SimklShowIds(mediaInfo.ProviderIds);
Year = mediaInfo.ProductionYear;
Seasons = new Season[]
{
new Season
{
Number = mediaInfo.ParentIndexNumber,
Episodes = new[]
{
new ShowEpisode
{
Number = mediaInfo.IndexNumber
}
}
}
};
}
/// <summary>
/// Gets or sets title.
/// </summary>
public string Title { get; set; }
/// <summary>
/// Gets or sets year.
/// </summary>
public int? Year { get; set; }
/// <summary>
/// Gets or sets seasons.
/// </summary>
public Season[] Seasons { get; set; }
/// <summary>
/// Gets or sets ids.
/// </summary>
public override SimklIds Ids { get; set; }
}
}