Add image languages

This commit is contained in:
cvium 2020-10-03 19:36:28 +02:00
parent e0f21afa62
commit d7cabb2e4e

View File

@ -55,10 +55,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
await EnsureClientConfigAsync().ConfigureAwait(false); await EnsureClientConfigAsync().ConfigureAwait(false);
// TODO include image language
movie = await _tmDbClient.GetMovieAsync( movie = await _tmDbClient.GetMovieAsync(
tmdbId, tmdbId,
TmdbUtils.NormalizeLanguage(language), TmdbUtils.NormalizeLanguage(language),
imageLanguages,
MovieMethods.Credits | MovieMethods.Releases | MovieMethods.Images | MovieMethods.Keywords | MovieMethods.Videos, MovieMethods.Credits | MovieMethods.Releases | MovieMethods.Images | MovieMethods.Keywords | MovieMethods.Videos,
cancellationToken).ConfigureAwait(false); cancellationToken).ConfigureAwait(false);
@ -121,10 +121,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
await EnsureClientConfigAsync().ConfigureAwait(false); await EnsureClientConfigAsync().ConfigureAwait(false);
// TODO include image language
series = await _tmDbClient.GetTvShowAsync( series = await _tmDbClient.GetTvShowAsync(
tmdbId, tmdbId,
language: TmdbUtils.NormalizeLanguage(language), language: TmdbUtils.NormalizeLanguage(language),
includeImageLanguage: imageLanguages,
extraMethods: TvShowMethods.Credits | TvShowMethods.Images | TvShowMethods.Keywords | TvShowMethods.ExternalIds | TvShowMethods.Videos | TvShowMethods.ContentRatings, extraMethods: TvShowMethods.Credits | TvShowMethods.Images | TvShowMethods.Keywords | TvShowMethods.ExternalIds | TvShowMethods.Videos | TvShowMethods.ContentRatings,
cancellationToken: cancellationToken).ConfigureAwait(false); cancellationToken: cancellationToken).ConfigureAwait(false);
@ -155,11 +155,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
await EnsureClientConfigAsync().ConfigureAwait(false); await EnsureClientConfigAsync().ConfigureAwait(false);
// TODO include image language
season = await _tmDbClient.GetTvSeasonAsync( season = await _tmDbClient.GetTvSeasonAsync(
tvShowId, tvShowId,
seasonNumber, seasonNumber,
language: TmdbUtils.NormalizeLanguage(language), language: TmdbUtils.NormalizeLanguage(language),
includeImageLanguage: imageLanguages,
extraMethods: TvSeasonMethods.Credits | TvSeasonMethods.Images | TvSeasonMethods.ExternalIds | TvSeasonMethods.Videos, extraMethods: TvSeasonMethods.Credits | TvSeasonMethods.Images | TvSeasonMethods.ExternalIds | TvSeasonMethods.Videos,
cancellationToken: cancellationToken).ConfigureAwait(false); cancellationToken: cancellationToken).ConfigureAwait(false);
@ -191,12 +191,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
await EnsureClientConfigAsync().ConfigureAwait(false); await EnsureClientConfigAsync().ConfigureAwait(false);
// TODO include image language
episode = await _tmDbClient.GetTvEpisodeAsync( episode = await _tmDbClient.GetTvEpisodeAsync(
tvShowId, tvShowId,
seasonNumber, seasonNumber,
episodeNumber, episodeNumber,
language: TmdbUtils.NormalizeLanguage(language), language: TmdbUtils.NormalizeLanguage(language),
includeImageLanguage: imageLanguages,
extraMethods: TvEpisodeMethods.Credits | TvEpisodeMethods.Images | TvEpisodeMethods.ExternalIds | TvEpisodeMethods.Videos, extraMethods: TvEpisodeMethods.Credits | TvEpisodeMethods.Images | TvEpisodeMethods.ExternalIds | TvEpisodeMethods.Videos,
cancellationToken: cancellationToken).ConfigureAwait(false); cancellationToken: cancellationToken).ConfigureAwait(false);
@ -259,10 +259,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
await EnsureClientConfigAsync().ConfigureAwait(false); await EnsureClientConfigAsync().ConfigureAwait(false);
// TODO language
result = await _tmDbClient.FindAsync( result = await _tmDbClient.FindAsync(
source, source,
externalId, externalId,
TmdbUtils.NormalizeLanguage(language),
cancellationToken).ConfigureAwait(false); cancellationToken).ConfigureAwait(false);
if (result != null) if (result != null)