From 3800fe9051fa3fcfc4d7032ef5f796048efb02cf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Dec 2015 22:10:04 -0500 Subject: [PATCH] fixes #1216 - Scraper (thetvdb) searches in wrong language --- MediaBrowser.Providers/TV/TvdbSeriesProvider.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs b/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs index 16c009812..5df5151ca 100644 --- a/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TvdbSeriesProvider.cs @@ -101,7 +101,7 @@ namespace MediaBrowser.Providers.TV result.Item = new Series(); result.HasMetadata = true; - FetchSeriesData(result, itemId.ProviderIds, cancellationToken); + FetchSeriesData(result, itemId.MetadataLanguage, itemId.ProviderIds, cancellationToken); await FindAnimeSeriesIndex(result.Item, itemId).ConfigureAwait(false); } @@ -140,10 +140,11 @@ namespace MediaBrowser.Providers.TV /// Fetches the series data. /// /// The result. + /// The metadata language. /// The series provider ids. /// The cancellation token. /// Task{System.Boolean}. - private void FetchSeriesData(MetadataResult result, Dictionary seriesProviderIds, CancellationToken cancellationToken) + private void FetchSeriesData(MetadataResult result, string metadataLanguage, Dictionary seriesProviderIds, CancellationToken cancellationToken) { var series = result.Item; @@ -160,7 +161,7 @@ namespace MediaBrowser.Providers.TV var seriesDataPath = GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds); - var seriesXmlFilename = series.GetPreferredMetadataLanguage().ToLower() + ".xml"; + var seriesXmlFilename = metadataLanguage.ToLower() + ".xml"; var seriesXmlPath = Path.Combine(seriesDataPath, seriesXmlFilename); var actorsXmlPath = Path.Combine(seriesDataPath, "actors.xml");