mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-20 21:55:03 -04:00
New: Dont Use Profile Language for Metadata Pull
This commit is contained in:
@@ -20,7 +20,6 @@ using NzbDrone.Core.Movies.AlternativeTitles;
|
||||
using NzbDrone.Core.Movies.Credits;
|
||||
using NzbDrone.Core.NetImport.ImportExclusions;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Profiles;
|
||||
|
||||
namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
{
|
||||
@@ -79,9 +78,9 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
return new HashSet<int>(response.Resource.results.Select(c => c.id));
|
||||
}
|
||||
|
||||
public Tuple<Movie, List<Credit>> GetMovieInfo(int tmdbId, Profile profile, bool hasPreDBEntry)
|
||||
public Tuple<Movie, List<Credit>> GetMovieInfo(int tmdbId, bool hasPreDBEntry)
|
||||
{
|
||||
var langCode = profile != null ? IsoLanguages.Get(profile.Language)?.TwoLetterCode ?? "en" : "en";
|
||||
var langCode = "en";
|
||||
|
||||
var request = _movieBuilder.Create()
|
||||
.SetSegment("api", "3")
|
||||
@@ -143,15 +142,6 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
var movie = new Movie();
|
||||
var altTitles = new List<AlternativeTitle>();
|
||||
|
||||
if (langCode != "en")
|
||||
{
|
||||
var iso = IsoLanguages.Find(resource.original_language);
|
||||
if (iso != null)
|
||||
{
|
||||
altTitles.Add(new AlternativeTitle(resource.original_title, SourceType.TMDB, tmdbId, iso.Language));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var alternativeTitle in resource.alternative_titles.titles)
|
||||
{
|
||||
if (alternativeTitle.iso_3166_1.ToLower() == langCode)
|
||||
@@ -498,7 +488,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
|
||||
try
|
||||
{
|
||||
return new List<Movie> { GetMovieInfo(tmdbid, null, false).Item1 };
|
||||
return new List<Movie> { GetMovieInfo(tmdbid, false).Item1 };
|
||||
}
|
||||
catch (MovieNotFoundException)
|
||||
{
|
||||
@@ -735,7 +725,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
Movie newMovie = movie;
|
||||
if (movie.TmdbId > 0)
|
||||
{
|
||||
newMovie = GetMovieInfo(movie.TmdbId, null, false).Item1;
|
||||
newMovie = GetMovieInfo(movie.TmdbId, false).Item1;
|
||||
}
|
||||
else if (movie.ImdbId.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user