From 814e76344424bbfde43a96f76f5182b2e4302fdc Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 22 May 2022 17:25:09 +0100 Subject: [PATCH] Add Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC test --- ...eons001_Downmix_to_stereo_and_apply_DRC.js | 4 -- ...eons001_Downmix_to_stereo_and_apply_DRC.js | 42 +++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 tests/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js diff --git a/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js b/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js index 39d830e..8baf72e 100644 --- a/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js +++ b/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js @@ -1,4 +1,3 @@ -// tdarrSkipTest const details = () => ({ id: 'Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC', Stage: 'Pre-processing', @@ -24,9 +23,6 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { FFmpegMode: true, reQueueAfter: true, infoLog: '', - file, - removeFromDB: false, - updateDB: false, container: `.${file.container}`, }; diff --git a/tests/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js b/tests/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js new file mode 100644 index 0000000..229b051 --- /dev/null +++ b/tests/Community/Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC.js @@ -0,0 +1,42 @@ +/* eslint max-len: 0 */ +const _ = require('lodash'); +const run = require('../helpers/run'); + +const tests = [ + { + input: { + file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: true, + preset: '-sn -vcodec copy -scodec copy -acodec aac -filter:a "dynaudnorm,pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL|FR < 1.0*FR + 0.707*FC + 0.707*BR"', + handBrakeMode: false, + FFmpegMode: true, + reQueueAfter: true, + infoLog: 'File matches requirements for processing. Downmixing and applying DRC!', + container: '.mp4', + }, + }, + { + input: { + file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: false, + preset: '', + handBrakeMode: false, + FFmpegMode: true, + reQueueAfter: true, + infoLog: 'File has more than 1 audio track - not processing', + container: '.mkv', + }, + }, +]; + +run(tests);