Skip to content

Commit

Permalink
refactor: add season id to episode info
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Nov 17, 2024
1 parent 6da574c commit b600e79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Shokofin/API/Info/EpisodeInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class EpisodeInfo

public string SeriesId;

public string SeasonId;

public string? AnidbId;

public string? TmdbId;
Expand Down Expand Up @@ -60,6 +62,7 @@ public EpisodeInfo(Episode episode, IReadOnlyList<TmdbEpisode> 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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b600e79

Please sign in to comment.