mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-30 04:34:49 +03:00
Fix Tmdb person language
This commit is contained in:
@@ -276,9 +276,10 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
|
||||
/// Gets a person eg. cast or crew member from the TMDb API based on its TMDb id.
|
||||
/// </summary>
|
||||
/// <param name="personTmdbId">The person's TMDb id.</param>
|
||||
/// <param name="language">The episode's language.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>The TMDb person information or null if not found.</returns>
|
||||
public async Task<Person> GetPersonAsync(int personTmdbId, CancellationToken cancellationToken)
|
||||
public async Task<Person> GetPersonAsync(int personTmdbId, string language, CancellationToken cancellationToken)
|
||||
{
|
||||
var key = $"person-{personTmdbId.ToString(CultureInfo.InvariantCulture)}";
|
||||
if (_memoryCache.TryGetValue(key, out Person person))
|
||||
@@ -290,6 +291,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
|
||||
|
||||
person = await _tmDbClient.GetPersonAsync(
|
||||
personTmdbId,
|
||||
TmdbUtils.NormalizeLanguage(language),
|
||||
PersonMethods.TvCredits | PersonMethods.MovieCredits | PersonMethods.Images | PersonMethods.ExternalIds,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user