Add Tdarr_Plugin_c0r1_SetDefaultAudioStream test

This commit is contained in:
HaveAGitGat 2022-05-22 13:04:34 +01:00
parent f70bed06ab
commit 998f4f64df
2 changed files with 49 additions and 1 deletions

View file

@ -1,5 +1,4 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_c0r1_SetDefaultAudioStream",

View file

@ -0,0 +1,49 @@
/* 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: true,
infoLog: '☑ No 2 channel audio stream exists. \n '
},
},
{
input: {
file: (()=>{
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
file.ffProbeData.streams[1].channels = 6;
return file;
})(),
librarySettings: {},
inputs: {
channels:'6',
},
otherArguments: {},
},
output: {
processFile: true,
preset: ',-map 0 -c copy -disposition:1 default -disposition:2 0 -disposition:3 0 -disposition:4 0 -disposition:5 0 ',
container: '.mkv',
handBrakeMode: false,
FFmpegMode: true,
infoLog: '☒ Matching audio stream is not set to default. \n' +
'☒ Setting 6 channel matching audio stream to default. Remove default from all other audio streams \n',
reQueueAfter: true
},
}
];
run(tests);