Make eachs stage optional and configurable
This commit is contained in:
parent
8c341c11fa
commit
93ff21021c
@ -1,13 +1,62 @@
|
|||||||
const details = () => ({
|
const details = () => ({
|
||||||
id: 'Tdarr_Plugin_MM1_Full_Stack',
|
id: 'Tdarr_Plugin_MM1_MrMeeb_Full_Stack',
|
||||||
Stage: 'Pre-processing',
|
Stage: 'Pre-processing',
|
||||||
Name: 'MrMeeb Full Stack Processing',
|
Name: 'MrMeeb Full Stack Processing',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
Operation: 'Transcode',
|
Operation: 'Transcode',
|
||||||
Description: 'Automatically removes TrueHD and replaces with a suitable AC3 5.1 track, either pre-existing or created.\n Removes non-English and non-German subtitles.\n Transcodes x264 content to HEVC using NVENC, with a focus on quality',
|
Description: 'Automatically removes TrueHD and replaces with a suitable AC3 5.1 track, either pre-existing or created.\n Removes non-English and non-German subtitles.\n Transcodes x264 content to HEVC using NVENC, with a focus on quality',
|
||||||
Version: '0.1',
|
Version: '0.1',
|
||||||
Tags: 'pre-processing',
|
Tags: 'pre-processing',
|
||||||
Inputs: [],
|
Inputs: [
|
||||||
|
{
|
||||||
|
name: 'process_video',
|
||||||
|
type: 'boolean',
|
||||||
|
defaultValue: true,
|
||||||
|
inputUI: {
|
||||||
|
type: 'dropdown',
|
||||||
|
options: [
|
||||||
|
'true',
|
||||||
|
'false',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tooltip: `Select whether to process video, or just copy over`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'process_audio',
|
||||||
|
type: 'boolean',
|
||||||
|
defaultValue: true,
|
||||||
|
inputUI: {
|
||||||
|
type: 'dropdown',
|
||||||
|
options: [
|
||||||
|
'true',
|
||||||
|
'false',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tooltip: `Select whether to process audio, or just copy over`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'process_subs',
|
||||||
|
type: 'boolean',
|
||||||
|
defaultValue: true,
|
||||||
|
inputUI: {
|
||||||
|
type: 'dropdown',
|
||||||
|
options: [
|
||||||
|
'true',
|
||||||
|
'false',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tooltip: `Select whether to process subs, or just copy over`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'crf',
|
||||||
|
type: 'string', // set the data type of the input ('string', 'number', 'boolean')
|
||||||
|
defaultValue: '19', // set the default value of the input incase the user enters no input
|
||||||
|
inputUI: {
|
||||||
|
type: 'text', // specify how the input UI will appear to the user ('text' or 'dropdown')
|
||||||
|
},
|
||||||
|
tooltip: `Enter CRF value used for video transcoding.`,
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -53,6 +102,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||||||
|
|
||||||
const processAudio = (file, librarySettings, inputs, otherArguments) => {
|
const processAudio = (file, librarySettings, inputs, otherArguments) => {
|
||||||
|
|
||||||
|
if (inputs.process_audio == false) {
|
||||||
|
|
||||||
|
response.infoLog += `Processing audio set to skip. Copying all present tracks over.\n`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
// Function variables
|
// Function variables
|
||||||
let audioIdx = -1;
|
let audioIdx = -1;
|
||||||
let audioIdxTruehd = -1;
|
let audioIdxTruehd = -1;
|
||||||
@ -431,6 +488,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||||||
|
|
||||||
const processSubs = (file, librarySettings, inputs, otherArguments) => {
|
const processSubs = (file, librarySettings, inputs, otherArguments) => {
|
||||||
|
|
||||||
|
if (inputs.process_subs == false) {
|
||||||
|
|
||||||
|
response.infoLog += `Processing subs set to skip. Copying all present tracks over.\n`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
// Function variables
|
// Function variables
|
||||||
let subIdx = -1;
|
let subIdx = -1;
|
||||||
|
|
||||||
@ -496,6 +561,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||||||
|
|
||||||
const processVideo = (file, librarySettings, inputs, otherArguments) => {
|
const processVideo = (file, librarySettings, inputs, otherArguments) => {
|
||||||
|
|
||||||
|
if (inputs.process_video == false) {
|
||||||
|
|
||||||
|
response.infoLog += `Processing video set to skip. Copying all present tracks over.\n`
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
console.log(` === Running processVideo function === `)
|
console.log(` === Running processVideo function === `)
|
||||||
|
|
||||||
// Check if video track is already HEVC
|
// Check if video track is already HEVC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user