Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing TvEpisode Translations #458

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
}
}
Loading