mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-28 19:54:48 +03:00
update MovieDb providers to search for images using all languages
This commit is contained in:
@@ -169,11 +169,10 @@ namespace MediaBrowser.Providers.BoxSets
|
||||
if (!string.IsNullOrEmpty(language))
|
||||
{
|
||||
url += string.Format("&language={0}", language);
|
||||
}
|
||||
|
||||
var includeImageLanguageParam = MovieDbProvider.GetImageLanguagesParam(language);
|
||||
// Get images in english and with no language
|
||||
url += "&include_image_language=" + includeImageLanguageParam;
|
||||
// Get images in english and with no language
|
||||
url += "&include_image_language=" + MovieDbProvider.GetImageLanguagesParam(language);
|
||||
}
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
@@ -196,7 +195,13 @@ namespace MediaBrowser.Providers.BoxSets
|
||||
{
|
||||
if (!string.IsNullOrEmpty(language) && !string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
url = string.Format(GetCollectionInfo3, id, MovieDbSearch.ApiKey) + "&include_image_language=en,null&language=en";
|
||||
url = string.Format(GetCollectionInfo3, id, MovieDbSearch.ApiKey) + "&language=en";
|
||||
|
||||
if (!string.IsNullOrEmpty(language))
|
||||
{
|
||||
// Get images in english and with no language
|
||||
url += "&include_image_language=" + MovieDbProvider.GetImageLanguagesParam(language);
|
||||
}
|
||||
|
||||
using (var json = await MovieDbProvider.Current.GetMovieDbResponse(new HttpRequestOptions
|
||||
{
|
||||
@@ -239,15 +244,9 @@ namespace MediaBrowser.Providers.BoxSets
|
||||
|
||||
private static string GetDataFilePath(IApplicationPaths appPaths, string tmdbId, string preferredLanguage)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(preferredLanguage))
|
||||
{
|
||||
throw new ArgumentNullException("preferredLanguage");
|
||||
}
|
||||
|
||||
var path = GetDataPath(appPaths, tmdbId);
|
||||
|
||||
var filename = string.Format("all-{0}.json",
|
||||
preferredLanguage);
|
||||
var filename = string.Format("all-{0}.json", preferredLanguage ?? string.Empty);
|
||||
|
||||
return Path.Combine(path, filename);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user