Skip to content

Commit

Permalink
Add missing TvSeason Translations
Browse files Browse the repository at this point in the history
Found another endpoint/method missing that I needed, this time for the seasons.
  • Loading branch information
revam committed Sep 28, 2023
1 parent ca5766d commit a814577
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TMDbLib/Client/TMDbClientTvSeasons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,10 @@ public async Task<ResultContainer<Video>> GetTvSeasonVideosAsync(int tvShowId, i
{
return await GetTvSeasonMethodInternal<ResultContainer<Video>>(tvShowId, seasonNumber, TvSeasonMethods.Videos, language: language, cancellationToken: cancellationToken).ConfigureAwait(false);
}

public async Task<TranslationsContainer> GetTvSeasonTranslationsAsync(int tvShowId, int seasonNumber, CancellationToken cancellationToken = default)
{
return await GetTvSeasonMethodInternal<TranslationsContainer>(tvShowId, seasonNumber, TvSeasonMethods.Translations, null, null, cancellationToken).ConfigureAwait(false);
}
}
}
3 changes: 3 additions & 0 deletions TMDbLib/Objects/TvShows/TvSeason.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@ public class TvSeason

[JsonProperty("videos")]
public ResultContainer<Video> Videos { get; set; }

[JsonProperty("translations")]
public TranslationsContainer Translations { get; set; }
}
}
2 changes: 2 additions & 0 deletions TMDbLib/Objects/TvShows/TvSeasonMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ public enum TvSeasonMethods
Videos = 8,
[EnumValue("account_states")]
AccountStates = 16,
[EnumValue("translations")]
Translations = 32,
}
}

0 comments on commit a814577

Please sign in to comment.