Merge branch 'support-external-audio-files' of github.com:jonas-resch/jellyfin into support-external-audio-files

This commit is contained in:
Jonas Resch 2021-12-03 19:19:53 +01:00
commit ca2d94ee97

View File

@ -698,7 +698,7 @@ namespace MediaBrowser.Controller.MediaEncoding
if (state.AudioStream != null && state.AudioStream.IsExternal) if (state.AudioStream != null && state.AudioStream.IsExternal)
{ {
arg.Append(" -i \"").Append(state.AudioStream.Path).Append("\""); arg.Append(" -i \"").Append(state.AudioStream.Path).Append('"');
} }
return arg.ToString(); return arg.ToString();
@ -2007,7 +2007,7 @@ namespace MediaBrowser.Controller.MediaEncoding
if (state.AudioStream.IsExternal) if (state.AudioStream.IsExternal)
{ {
int externalAudioMapIndex = state.SubtitleStream != null && state.SubtitleStream.IsExternal ? 2 : 1; int externalAudioMapIndex = state.SubtitleStream != null && state.SubtitleStream.IsExternal ? 2 : 1;
int externalAudioStream = state.MediaSource.MediaStreams.Where(i => i.Path == state.AudioStream.Path).ToList().IndexOf(state.AudioStream); int externalAudioStream = state.MediaSource.MediaStreams.FindIndex(i => i.Path == state.AudioStream.Path);
args += string.Format( args += string.Format(
CultureInfo.InvariantCulture, CultureInfo.InvariantCulture,