mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Add Tdarr_Plugin_sdf5_Thierrrrry_Remove_Non_English_Audio test
This commit is contained in:
parent
457c88efba
commit
10a693bc5c
3 changed files with 63 additions and 3 deletions
|
|
@ -45,8 +45,6 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
var jsonString = JSON.stringify(file);
|
||||
response.container = ".mkv";
|
||||
|
||||
console.log(file.ffProbeData.streams[0].codec_name);
|
||||
console.log(file.video_resolution);
|
||||
if (
|
||||
file.ffProbeData.streams[0].codec_name == "hevc" ||
|
||||
file.video_resolution !== "4KUHD"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable */
|
||||
// tdarrSkipTest
|
||||
const details = () => {
|
||||
return {
|
||||
id: "Tdarr_Plugin_sdf5_Thierrrrry_Remove_Non_English_Audio",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
/* 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,
|
||||
reQueueAfter: false,
|
||||
infoLog: "☑File doesn't contain tracks which are not english or undefined! \n",
|
||||
},
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: (() => {
|
||||
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
||||
file.ffProbeData.streams[1].tags.language = 'fre';
|
||||
return file;
|
||||
})(),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: false,
|
||||
preset: '',
|
||||
container: '.mp4',
|
||||
handBrakeMode: false,
|
||||
FFmpegMode: true,
|
||||
reQueueAfter: false,
|
||||
infoLog: "☑File doesn't contain tracks which are not english or undefined! \n",
|
||||
},
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: true,
|
||||
preset: ', -map 0 -map -0:a:3 -c copy',
|
||||
container: '.mkv',
|
||||
handBrakeMode: false,
|
||||
FFmpegMode: true,
|
||||
reQueueAfter: true,
|
||||
infoLog: '☒File contains tracks which are not english or undefined. Removing! \n',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
run(tests);
|
||||
Loading…
Add table
Add a link
Reference in a new issue