Add Tdarr_Plugin_a9hc_HaveAGitGat_HandBrake_H264_Fast1080p30 test

make-only-subtitle-default
HaveAGitGat 4 years ago
parent 406480df71
commit d66b54506b

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_a9hc_HaveAGitGat_HandBrake_H264_Fast1080p30",

@ -36,6 +36,30 @@ const tests = [
infoLog: '☒File is not in h264! \n',
},
},
{
input: {
file: () => {
const file = require('../sampleData/media/sampleH264_1.json');
file.meta.Title = undefined;
return file;
},
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is already in h264! \n'
+ '☑File has no subs \n'
+ '☑File has no title metadata☑File has aac track \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

@ -0,0 +1,65 @@
/* eslint max-len: 0 */
const run = require('../helpers/run');
const tests = [
{
input: {
file: require('../sampleData/media/sampleH264_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map_metadata -1 -map 0 -c copy',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: '☑File is already in h264! \n☑File has no subs \n☒File has title metadata \n',
},
},
{
input: {
file: require('../sampleData/media/sampleH265_1.json'),
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: true,
preset: '-Z "Fast 1080p30"',
container: '.mp4',
handBrakeMode: true,
FFmpegMode: false,
reQueueAfter: true,
infoLog: '☒File is not in h264! \n',
},
},
{
input: {
file: () => {
const file = require('../sampleData/media/sampleH264_1.json');
file.meta.Title = undefined;
return file;
},
librarySettings: {},
inputs: {},
otherArguments: {},
},
output: {
processFile: false,
preset: '',
container: '.mp4',
handBrakeMode: false,
FFmpegMode: false,
reQueueAfter: false,
infoLog: '☑File is already in h264! \n'
+ '☑File has no subs \n'
+ '☑File has no title metadata☑File has aac track \n'
+ '☑File meets conditions! \n',
},
},
];
run(tests);

@ -11,9 +11,13 @@ const run = async (tests) => {
// eslint-disable-next-line no-console
console.log(`${scriptName}: test ${i}`);
const test = tests[i];
let { file } = test.input;
if (typeof test.input.file === 'function') {
file = test.input.file();
}
// eslint-disable-next-line no-await-in-loop
const testOutput = await plugin(
test.input.file,
file,
test.input.librarySettings,
test.input.inputs,
test.input.otherArguments,

Loading…
Cancel
Save