mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 23:48:15 -07:00
Merge pull request #178 from HaveAGitGat/vodkapmp-patch-1
Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
This commit is contained in:
commit
29f23fadbf
1 changed files with 30 additions and 0 deletions
|
|
@ -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 4k/UHD, 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…
Add table
Add a link
Reference in a new issue