From e3c7eed56d05791085c4827fe7b2c4e3335822cb Mon Sep 17 00:00:00 2001 From: vodkapmp <70449815+vodkapmp@users.noreply.github.com> Date: Fri, 1 Oct 2021 16:55:22 +0200 Subject: [PATCH 1/2] Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js Add a way to skip processing SD and UHD content. --- ..._vdka_Tiered_CPU_CRF_Based_Configurable.js | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) 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 9334699..4ff1965 100644 --- a/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js +++ b/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js @@ -72,6 +72,20 @@ function details() { \\nExample:\\n veryfast`, }, + { + name: 'sdDisabled', + tooltip: `Input "true" if you want to skip SD (480p and 576p) files + + \\nExample:\\n + true`, + }, + { + name: 'uhdDisabled', + tooltip: `Input "true" if you want to skip 4k (UHD) files + + \\nExample:\\n + true`, + }, ], }; } @@ -97,6 +111,22 @@ function plugin(file, librarySettings, inputs) { } response.infoLog += '☑File is a video! \n'; + // check if the file is SD and sdDisable is enabled + // skip this plugin if so + if (['480p', '576p'].includes(file.video_resolution) && inputs.sdDisabled) { + response.processFile = false; + response.infoLog += '☒File is SD, not processing\n'; + return response; + } + + // check if the file is 4k and 4kDisable is enabled + // skip this plugin if so + if (file.video_resolution === '4KUHD' && inputs.uhdDisabled) { + response.processFile = false; + response.infoLog += '☒File is SD, not processing\n'; + return response; + } + // 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) { From 99c57cbcc3212403dbb08e93bf075d6b4309213c Mon Sep 17 00:00:00 2001 From: vodkapmp <70449815+vodkapmp@users.noreply.github.com> Date: Fri, 1 Oct 2021 17:12:03 +0200 Subject: [PATCH 2/2] Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js I might have done a copy paste and not changed something..... --- .../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 4ff1965..7647830 100644 --- a/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js +++ b/Community/Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js @@ -123,7 +123,7 @@ function plugin(file, librarySettings, inputs) { // skip this plugin if so if (file.video_resolution === '4KUHD' && inputs.uhdDisabled) { response.processFile = false; - response.infoLog += '☒File is SD, not processing\n'; + response.infoLog += '☒File is 4k/UHD, not processing\n'; return response; }