mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 10:15:54 -07:00
Merge pull request #670 from HaveAGitGat/custom
Add original container option.
This commit is contained in:
commit
27f0f3196b
2 changed files with 29 additions and 2 deletions
|
|
@ -70,7 +70,7 @@ HandBrake examples:
|
||||||
type: 'text',
|
type: 'text',
|
||||||
},
|
},
|
||||||
tooltip:
|
tooltip:
|
||||||
'Enter the desired container',
|
'Enter the desired container. Set to "original" to keep the original container.',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
@ -91,7 +91,13 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
response.preset = inputs.arguments;
|
response.preset = inputs.arguments;
|
||||||
response.container = `.${inputs.container}`;
|
|
||||||
|
if (inputs.container === 'original') {
|
||||||
|
response.container = `.${file.container}`;
|
||||||
|
} else {
|
||||||
|
response.container = `.${inputs.container}`;
|
||||||
|
}
|
||||||
|
|
||||||
response.handbrakeMode = inputs.cli === 'handbrake';
|
response.handbrakeMode = inputs.cli === 'handbrake';
|
||||||
response.ffmpegMode = inputs.cli === 'ffmpeg';
|
response.ffmpegMode = inputs.cli === 'ffmpeg';
|
||||||
response.reQueueAfter = true;
|
response.reQueueAfter = true;
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,27 @@ const tests = [
|
||||||
infoLog: 'File is being transcoded using custom arguments \n',
|
infoLog: 'File is being transcoded using custom arguments \n',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
input: {
|
||||||
|
file: require('../sampleData/media/sampleH264_1.json'),
|
||||||
|
librarySettings: {},
|
||||||
|
inputs: {
|
||||||
|
cli: 'ffmpeg',
|
||||||
|
arguments: '<io>-c:v libx265 -crf 23 -ac 6 -c:a aac -preset veryfast',
|
||||||
|
container: 'original',
|
||||||
|
},
|
||||||
|
otherArguments: {},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
processFile: true,
|
||||||
|
preset: '<io>-c:v libx265 -crf 23 -ac 6 -c:a aac -preset veryfast',
|
||||||
|
container: '.mp4',
|
||||||
|
handbrakeMode: false,
|
||||||
|
ffmpegMode: true,
|
||||||
|
reQueueAfter: true,
|
||||||
|
infoLog: 'File is being transcoded using custom arguments \n',
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
void run(tests);
|
void run(tests);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue