Misc changes

This commit is contained in:
MrMeeb 2024-04-21 15:58:14 +00:00
parent 9e9906ffed
commit 885000e21a

View File

@ -65,42 +65,42 @@ const details = () => ({
// eslint-disable-next-line no-unused-vars
const plugin = (file, librarySettings, inputs, otherArguments) => {
const lib = require('../methods/lib')();
// load default plugin inputs
inputs = lib.loadDefaultValues(inputs, details);
const lib = require('../methods/lib')();
// load default plugin inputs
inputs = lib.loadDefaultValues(inputs, details);
// Load response object
const response = {
processFile: false, // If set to false, the file will be skipped. Set to true to have the file transcoded.
preset: '', // HandBrake/FFmpeg CLI arguments you'd like to use.
// For FFmpeg, the input arguments come first followed by <io>, followed by the output argument.
// Examples
// HandBrake
// '-Z "Very Fast 1080p30"'
// FFmpeg
// '-sn <io> -map_metadata -1 -c:v copy -c:a copy'
container: '.mp4', // The container of the transcoded output file.
handBrakeMode: false, // Set whether to use HandBrake or FFmpeg for transcoding
FFmpegMode: false,
infoLog: '', // This will be shown when the user clicks the 'i' (info) button on a file in the output queue if
// it has been skipped.
// Give reasons why it has been skipped ('File has no title metadata, File meets conditions!')
// Load response object
const response = {
processFile: false, // If set to false, the file will be skipped. Set to true to have the file transcoded.
preset: '', // HandBrake/FFmpeg CLI arguments you'd like to use.
// For FFmpeg, the input arguments come first followed by <io>, followed by the output argument.
// Examples
// HandBrake
// '-Z "Very Fast 1080p30"'
// FFmpeg
// '-sn <io> -map_metadata -1 -c:v copy -c:a copy'
container: '.mp4', // The container of the transcoded output file.
handBrakeMode: false, // Set whether to use HandBrake or FFmpeg for transcoding
FFmpegMode: false,
infoLog: '', // This will be shown when the user clicks the 'i' (info) button on a file in the output queue if
// it has been skipped.
// Give reasons why it has been skipped ('File has no title metadata, File meets conditions!')
// Optional (include together)
//file,
//removeFromDB: false, // Tell Tdarr to remove file from database if true
//updateDB: false, // Change file object above and update database if true
};
// Optional (include together)
//file,
//removeFromDB: false, // Tell Tdarr to remove file from database if true
//updateDB: false, // Change file object above and update database if true
};
// Required global variables for functions
let ffmpegAudioFirstTrack = '';
let ffmpegAudioOtherTracks = '';
let ffmpegSubs = '';
let ffmpegVideo = '';
// Required global variables for functions
let ffmpegAudioFirstTrack = '';
let ffmpegAudioOtherTracks = '';
let ffmpegSubs = '';
let ffmpegVideo = '';
// Defining functions
// Defining functions
const processAudio = (file, librarySettings, inputs, otherArguments) => {
const processAudio = (file, librarySettings, inputs, otherArguments) => {
if (inputs.process_audio == false) {