From b600e798edf1d428b939aff86755922fedf5ad8f Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 17 Nov 2024 19:47:41 +0100 Subject: [PATCH] refactor: add season id to episode info --- Shokofin/API/Info/EpisodeInfo.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Shokofin/API/Info/EpisodeInfo.cs b/Shokofin/API/Info/EpisodeInfo.cs index dd53a7a..81a9f93 100644 --- a/Shokofin/API/Info/EpisodeInfo.cs +++ b/Shokofin/API/Info/EpisodeInfo.cs @@ -15,6 +15,8 @@ public class EpisodeInfo public string SeriesId; + public string SeasonId; + public string? AnidbId; public string? TmdbId; @@ -60,6 +62,7 @@ public EpisodeInfo(Episode episode, IReadOnlyList tmdbEpisodes) .FirstOrDefault(); Id = episode.IDs.Shoko.ToString(); SeriesId = episode.IDs.ParentSeries.ToString(); + SeasonId = episode.IDs.ParentSeries.ToString(); AnidbId = episode.AniDB.Id.ToString(); StructureType = SeriesStructureType.Shoko_Groups; Type = episode.AniDB.Type; @@ -94,6 +97,7 @@ public EpisodeInfo(TmdbEpisode episode) { Id = episode.Id.ToString(); SeriesId = episode.ShowId.ToString(); + SeasonId = episode.SeasonId; TmdbId = episode.Id.ToString(); StructureType = SeriesStructureType.TMDB_SeriesAndMovies; Type = episode.SeasonNumber is 0 ? EpisodeType.Special : EpisodeType.Normal;