mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-15 11:34:38 -04:00
async open subtitle methods
This commit is contained in:
parent
1a323767be
commit
d6ce2eacb5
@ -109,7 +109,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
|
|
||||||
// There's an internal subtitle stream for this language
|
// There's an internal subtitle stream for this language
|
||||||
if (skipIfGraphicalSubtitlesPresent &&
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,8 @@ namespace MediaBrowser.Providers.Subtitles
|
|||||||
subtitleSearchParameters
|
subtitleSearchParameters
|
||||||
};
|
};
|
||||||
|
|
||||||
var result = OpenSubtitles.SearchSubtitles(parms.ToArray());
|
var result = await OpenSubtitles.SearchSubtitlesAsync(parms.ToArray(), cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
if (!(result is MethodResponseSubtitleSearch))
|
if (!(result is MethodResponseSubtitleSearch))
|
||||||
{
|
{
|
||||||
_logger.Debug("Invalid response type");
|
_logger.Debug("Invalid response type");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user