Shorten calculation of audio startIndex in MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
pull/6898/head
Jonas Resch 3 years ago committed by Jonas Resch
parent 9978164438
commit c1a8385c9c

@ -591,7 +591,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
var audioResolver = new AudioResolver(_localization, _mediaEncoder, cancellationToken);
var startIndex = currentStreams.Count == 0 ? 0 : (currentStreams.Select(i => i.Index).Max() + 1);
var startIndex = currentStreams.Count == 0 ? 0 : currentStreams.Max(i => i.Index) + 1;
var externalAudioStreams = audioResolver.GetExternalAudioStreams(video, startIndex, options.DirectoryService, false);
video.AudioFiles = externalAudioStreams.Select(i => i.Path).ToArray();

Loading…
Cancel
Save