async open subtitle methods

This commit is contained in:
Luke Pulverenti 2014-05-09 00:38:21 -04:00
parent 1a323767be
commit d6ce2eacb5
2 changed files with 3 additions and 2 deletions

View File

@ -109,7 +109,7 @@ namespace MediaBrowser.Providers.MediaInfo
// There's an internal subtitle stream for this language
if (skipIfGraphicalSubtitlesPresent &&
internalMediaStreams.Any(i => i.Type == MediaStreamType.Subtitle && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
internalMediaStreams.Any(i => i.Type == MediaStreamType.Subtitle && i.IsGraphicalSubtitleStream && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
{
return false;
}

View File

@ -218,7 +218,8 @@ namespace MediaBrowser.Providers.Subtitles
subtitleSearchParameters
};
var result = OpenSubtitles.SearchSubtitles(parms.ToArray());
var result = await OpenSubtitles.SearchSubtitlesAsync(parms.ToArray(), cancellationToken).ConfigureAwait(false);
if (!(result is MethodResponseSubtitleSearch))
{
_logger.Debug("Invalid response type");