fixes #1349 - Problem with Greek subtitle download

pull/702/head
Luke 9 years ago committed by Luke Pulverenti
parent 2e2929c77f
commit cc315c573c

@ -222,6 +222,17 @@ namespace MediaBrowser.Providers.Subtitles
});
}
private string NormalizeLanguage(string language)
{
// Problem with Greek subtitle download #1349
if (string.Equals (language, "gre", StringComparison.OrdinalIgnoreCase)) {
return "ell";
}
return language;
}
public async Task<IEnumerable<RemoteSubtitleInfo>> Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
{
var imdbIdText = request.GetProviderId(MetadataProviders.Imdb);
@ -258,7 +269,7 @@ namespace MediaBrowser.Providers.Subtitles
await Login(cancellationToken).ConfigureAwait(false);
var subLanguageId = request.Language;
var subLanguageId = NormalizeLanguage(request.Language);
var hash = Utilities.ComputeHash(request.MediaPath);
var fileInfo = new FileInfo(request.MediaPath);
var movieByteSize = fileInfo.Length;

Loading…
Cancel
Save