Skip to content

Commit

Permalink
Add missing TvEpisode Translations
Browse files Browse the repository at this point in the history
…and another endpoint/method missing that I needed, this time for the episodes.
  • Loading branch information
revam committed Sep 29, 2023
1 parent ca5766d commit 3667541
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 3667541

Please sign in to comment.