Skip to content

Commit

Permalink
Merge pull request #458 from revam/patch-6
Browse files Browse the repository at this point in the history
Add missing TvEpisode Translations
  • Loading branch information
cvium authored Oct 11, 2023
2 parents 361845c + 3667541 commit 5ebe593
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TMDbLib/Client/TMDbClientTvEpisodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ public async Task<ResultContainer<Video>> GetTvEpisodeVideosAsync(int tvShowId,
return await GetTvEpisodeMethodInternal<ResultContainer<Video>>(tvShowId, seasonNumber, episodeNumber, TvEpisodeMethods.Videos, cancellationToken: cancellationToken).ConfigureAwait(false);
}

public async Task<TranslationsContainer> GetTvEpisodeTranslationsAsync(int tvShowId, int seasonNumber, int episodeNumber, CancellationToken cancellationToken = default)
{
return await GetTvEpisodeMethodInternal<TranslationsContainer>(tvShowId, seasonNumber, episodeNumber, TvEpisodeMethods.Translations, null, null, cancellationToken).ConfigureAwait(false);
}

public async Task<bool> TvEpisodeRemoveRatingAsync(int tvShowId, int seasonNumber, int episodeNumber, CancellationToken cancellationToken = default)
{
RequireSessionId(SessionType.GuestSession);
Expand Down
3 changes: 3 additions & 0 deletions TMDbLib/Objects/TvShows/TvEpisode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ public class TvEpisode : TvEpisodeBase

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

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

0 comments on commit 5ebe593

Please sign in to comment.