From 333e096788a41b4f679e62ecbb2ff94e1ca28a52 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sat, 21 May 2022 19:18:47 +0100 Subject: [PATCH] Add Tdarr_Plugin_075a_Transcode_Customisable test --- ...darr_Plugin_075a_Transcode_Customisable.js | 1 - ...darr_Plugin_075a_Transcode_Customisable.js | 81 +++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 tests/Community/Tdarr_Plugin_075a_Transcode_Customisable.js diff --git a/Community/Tdarr_Plugin_075a_Transcode_Customisable.js b/Community/Tdarr_Plugin_075a_Transcode_Customisable.js index 5fad3f9..7a144d1 100644 --- a/Community/Tdarr_Plugin_075a_Transcode_Customisable.js +++ b/Community/Tdarr_Plugin_075a_Transcode_Customisable.js @@ -1,5 +1,4 @@ /* eslint-disable */ -// tdarrSkipTest const details = () => ({ id: "Tdarr_Plugin_075a_Transcode_Customisable", Stage: "Pre-processing", diff --git a/tests/Community/Tdarr_Plugin_075a_Transcode_Customisable.js b/tests/Community/Tdarr_Plugin_075a_Transcode_Customisable.js new file mode 100644 index 0000000..c6627a6 --- /dev/null +++ b/tests/Community/Tdarr_Plugin_075a_Transcode_Customisable.js @@ -0,0 +1,81 @@ +/* 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: '-Z "Very Fast 1080p30" --all-subtitles --all-audio', + container: '.mkv', + handBrakeMode: true, + FFmpegMode: false, + reQueueAfter: true, + infoLog: '☒File is not in desired codec! \n', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH265_1.json'), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: false, + preset: '', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: false, + reQueueAfter: false, + infoLog: '☑File is already in hevc! \n', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + codecs_to_exclude: 'h264', + }, + otherArguments: {}, + }, + output: { + processFile: false, + preset: '', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: false, + reQueueAfter: false, + infoLog: '☑File is already in h264! \n', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + codecs_to_exclude: 'hevc', + cli: 'handbrake', + transcode_arguments: '-Z "Very Fast 480p30"', + }, + otherArguments: {}, + }, + output: { + processFile: true, + preset: '-Z "Very Fast 480p30"', + container: '.mkv', + handBrakeMode: true, + FFmpegMode: false, + reQueueAfter: true, + infoLog: '☒File is not in desired codec! \n', + }, + }, +]; + +run(tests);