fixes #1349 - Problem with Greek subtitle download

This commit is contained in:
Luke 2015-12-24 02:15:39 -05:00
parent 575ca7683c
commit 74b7a816f8
1 changed files with 12 additions and 1 deletions

View File

@ -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;