Skip to content

Commit

Permalink
Merge pull request #457 from revam/patch-5
Browse files Browse the repository at this point in the history
Add missing TvSeason Translations
  • Loading branch information
cvium committed Oct 11, 2023
2 parents 5ebe593 + a814577 commit 5d43425
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 5d43425

Please sign in to comment.