Merge pull request #3699 from oddstr13/pr-embedded-subs-1

Fix embedded subtitles

(cherry picked from commit bfecfab538)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
Anthony Lavado 2020-07-26 15:36:29 -07:00 committed by Joshua M. Boniface
parent 4ce16489a4
commit 8b42ef451c

View File

@ -172,7 +172,13 @@ namespace MediaBrowser.MediaEncoding.Subtitles
inputFiles = new[] { mediaSource.Path };
}
var fileInfo = await GetReadableFile(mediaSource.Path, inputFiles, _mediaSourceManager.GetPathProtocol(subtitleStream.Path), subtitleStream, cancellationToken).ConfigureAwait(false);
var protocol = mediaSource.Protocol;
if (subtitleStream.IsExternal)
{
protocol = _mediaSourceManager.GetPathProtocol(subtitleStream.Path);
}
var fileInfo = await GetReadableFile(mediaSource.Path, inputFiles, protocol, subtitleStream, cancellationToken).ConfigureAwait(false);
var stream = await GetSubtitleStream(fileInfo.Path, fileInfo.Protocol, fileInfo.IsExternal, cancellationToken).ConfigureAwait(false);