Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js

Add a way to skip processing SD and UHD content.
make-only-subtitle-default
vodkapmp 4 years ago committed by GitHub
parent b63ffad5f2
commit e3c7eed56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) {

Loading…
Cancel
Save