diff --git a/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js b/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js index 8c8b8e2..00df33b 100644 --- a/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js +++ b/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js @@ -1,5 +1,4 @@ /* eslint-disable */ -// tdarrSkipTest const details = () => { return { id: "Tdarr_Plugin_sdd3_Remove_Commentary_Tracks", diff --git a/tests/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js b/tests/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js new file mode 100644 index 0000000..0cbc716 --- /dev/null +++ b/tests/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js @@ -0,0 +1,48 @@ +/* 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: false, + infoLog: '☑File is a video! \n' + + "☑File doesn't contain commentary tracks! \n" + + '☑File meets conditions! \n', + }, + }, + { + input: { + file: (() => { + const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json')); + file.ffProbeData.streams[1].tags.title = 'commentary'; + return file; + })(), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: true, + preset: ', -map 0 -map -0:a:0 -c copy', + container: '.mp4', + handBrakeMode: false, + FFmpegMode: true, + reQueueAfter: true, + infoLog: '☑File is a video! \n☒File contains commentary tracks. Removing! \n', + }, + }, +]; + +run(tests);