From 1160d526319fc5d7a4fe2fab501adfa187b8d0be Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 22 May 2022 13:08:38 +0100 Subject: [PATCH] Add Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix test --- ...in_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js | 1 - ...in_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js | 47 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 tests/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js diff --git a/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js b/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js index 137ae08..c1b9ea4 100644 --- a/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js +++ b/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js @@ -1,5 +1,4 @@ /* eslint-disable */ -// tdarrSkipTest const details = () => { return { id: "Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix", diff --git a/tests/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js b/tests/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js new file mode 100644 index 0000000..c80b3dc --- /dev/null +++ b/tests/Community/Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix.js @@ -0,0 +1,47 @@ +/* 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: false, + preset: '', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: false, + reQueueAfter: true, + infoLog: '☑File is a video Without Mjpeg! \n', + }, + }, + { + input: { + file: (() => { + const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json')); + file.ffProbeData.streams[0].codec_name = 'mjpeg'; + return file; + })(), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: false, + preset: ',-map 0 -map -0:v:1 -c:v copy -c:a copy -c:s copy', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: false, + reQueueAfter: true, + infoLog: '☒File is not a video but has Mjpeg Stream! \n' + + '☑File is a video With Mjpeg! \n', + }, + }, +]; + +run(tests);