From ccd4c79228ecba11d568f4784ea38ede1cd94f05 Mon Sep 17 00:00:00 2001 From: Guillaume Taquet Gasperini Date: Fri, 20 Mar 2020 17:09:15 +0100 Subject: [PATCH] Fix #54 --- Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js b/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js index 5379f59..2c79048 100644 --- a/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js +++ b/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js @@ -62,7 +62,7 @@ function plugin(file) { try { - if ( file.ffProbeData.streams[1].channels >= 6 && file.ffProbeData.streams[i].codec_name !== 'ac3' && file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio" ) { + if ( file.ffProbeData.streams[i].channels >= 6 && file.ffProbeData.streams[i].codec_name !== 'ac3' && file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio" ) { ffmpegCommandInsert += ` -c:a:${audioIdx} ac3 ` hasnonAC3SurroundTrack = true