From 92d568b5722292639c7f41dc6bd78dd12a5eab15 Mon Sep 17 00:00:00 2001 From: Enigma Date: Wed, 26 Jan 2022 11:13:12 -0500 Subject: [PATCH] Fix error when stream has no codec_name Sometimes a stream has no codec_name property and the plugin fails --- .../Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js b/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js index d2d0be7..a988ad0 100644 --- a/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js +++ b/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js @@ -173,7 +173,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { // check if the file is already hevc // it will not be transcoded if true and the plugin will be stopped immediately for (let i = 0; i < file.ffProbeData.streams.length; i += 1) { - if (file.ffProbeData.streams[i].codec_name.toLowerCase() === 'hevc') { + if (file.ffProbeData.streams[i].codec_name && file.ffProbeData.streams[i].codec_name.toLowerCase() === 'hevc') { response.processFile = false; response.infoLog += '☑File is already in hevc! \n'; return response;