mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-11 00:10:29 -07:00
Rename file and add tests
This commit is contained in:
parent
e3d27da87f
commit
4d06a170a6
2 changed files with 86 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
const details = () => ({
|
const details = () => ({
|
||||||
id: 'Tdarr_Plugin_fu69_aune_audio_to_flac',
|
id: 'Tdarr_Plugin_f4k1_aune_audio_to_flac',
|
||||||
Stage: 'Pre-processing',
|
Stage: 'Pre-processing',
|
||||||
Name: 'Aune - Audio to FLAC',
|
Name: 'Aune - Audio to FLAC',
|
||||||
Type: 'Audio',
|
Type: 'Audio',
|
||||||
85
tests/Community/Tdarr_Plugin_f4k1_aune_audio_to_flac.js
Normal file
85
tests/Community/Tdarr_Plugin_f4k1_aune_audio_to_flac.js
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
/* 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: '<io> -c:a flac -f flac',
|
||||||
|
container: '.flac',
|
||||||
|
handBrakeMode: false,
|
||||||
|
FFmpegMode: true,
|
||||||
|
reQueueAfter: true,
|
||||||
|
infoLog: '☒File contains video!\n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: {
|
||||||
|
file: _.cloneDeep(require('../sampleData/media/sampleMP3_1.json')),
|
||||||
|
librarySettings: {},
|
||||||
|
inputs: {},
|
||||||
|
otherArguments: {},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
processFile: false,
|
||||||
|
preset: '<io> -c:a flac -f flac',
|
||||||
|
container: '.flac',
|
||||||
|
handBrakeMode: false,
|
||||||
|
FFmpegMode: true,
|
||||||
|
reQueueAfter: true,
|
||||||
|
infoLog: '☑No matching codecs found!\n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: {
|
||||||
|
file: _.cloneDeep(require('../sampleData/media/sampleMP3_1.json')),
|
||||||
|
librarySettings: {},
|
||||||
|
inputs: {
|
||||||
|
codecs: 'mp3',
|
||||||
|
},
|
||||||
|
otherArguments: {},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
processFile: true,
|
||||||
|
preset: '<io> -c:a flac -f flac',
|
||||||
|
container: '.flac',
|
||||||
|
handBrakeMode: false,
|
||||||
|
FFmpegMode: true,
|
||||||
|
reQueueAfter: true,
|
||||||
|
infoLog: '☒Found mp3 codec!\n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: {
|
||||||
|
file: (() => {
|
||||||
|
const file = _.cloneDeep(require('../sampleData/media/sampleH264_2.json'));
|
||||||
|
// mock audio file with multiple streams
|
||||||
|
file.ffProbeData.streams[0].codec_type = 'audio';
|
||||||
|
return file;
|
||||||
|
})(),
|
||||||
|
librarySettings: {},
|
||||||
|
inputs: {
|
||||||
|
codecs: 'ac3,eac3,aac',
|
||||||
|
},
|
||||||
|
otherArguments: {},
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
processFile: true,
|
||||||
|
preset: '<io> -c:a flac -f flac',
|
||||||
|
container: '.flac',
|
||||||
|
handBrakeMode: false,
|
||||||
|
FFmpegMode: true,
|
||||||
|
reQueueAfter: true,
|
||||||
|
infoLog: '☒Found ac3 codec!\n',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
run(tests);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue