From e48adf33aaac959b94bf830a7e11a38a243403eb Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 22 May 2022 12:56:44 +0100 Subject: [PATCH] Add Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3 test --- ...gin_b39x_the1poet_surround_sound_to_ac3.js | 1 - ...gin_b39x_the1poet_surround_sound_to_ac3.js | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 tests/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js diff --git a/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js b/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js index 07222fc..0546d04 100644 --- a/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js +++ b/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js @@ -1,4 +1,3 @@ -// tdarrSkipTest const details = () => ({ id: 'Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3', Stage: 'Pre-processing', diff --git a/tests/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js b/tests/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js new file mode 100644 index 0000000..a3b9e80 --- /dev/null +++ b/tests/Community/Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3.js @@ -0,0 +1,59 @@ +/* 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: ',-map 0 -c:v copy -c:a copy -c:a:0 ac3 -c:s copy -c:d copy', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: true, + reQueueAfter: true, + infoLog: '☒ File has surround audio which is NOT in ac3! \n', + }, + }, + { + input: { + file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: false, + preset: '', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: false, + reQueueAfter: false, + infoLog: '☑ All surround audio streams are in ac3! \n☑File meets conditions! \n', + }, + }, + { + input: { + file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: false, + preset: '', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: false, + reQueueAfter: false, + infoLog: '☑ All surround audio streams are in ac3! \n☑File meets conditions! \n', + }, + }, +]; + +run(tests);