async open subtitle methods

pull/702/head
Luke Pulverenti 11 years ago
parent 1a323767be
commit d6ce2eacb5

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

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

Loading…
Cancel
Save