From 95932246a8bccd3ae5e0b78a36a45d8c75d5e3bc Mon Sep 17 00:00:00 2001 From: michpas <66222810+michpas@users.noreply.github.com> Date: Mon, 27 Sep 2021 16:59:41 +0200 Subject: [PATCH] Update Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js (#144) * Update Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js Solves an issue where the plugin errors out on datatreams that do not have a copyright tag. It now only scans audio streams. In addition, improved the routine, by checking if the desired output codex is already processed (not any audio stream) * Fix lint issues Co-authored-by: Rick Meijer --- Community/Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Community/Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js b/Community/Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js index c2b826e..32b8e0a 100644 --- a/Community/Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js +++ b/Community/Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js @@ -64,7 +64,7 @@ function plugin(file, librarySettings, inputs) { for (let i = 0; i < file.ffProbeData.streams.length; i += 1) { const currStream = file.ffProbeData.streams[i]; - if (currStream.tags.COPYRIGHT) { + if (currStream.codec_type.toLowerCase() === 'audio' && currStream.codec_name === inputs.output_codec) { if (currStream.tags.COPYRIGHT === 'henk_asac') { killPlugin = true; }