mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-14 17:55:55 -07:00
Apply auto-build changes
This commit is contained in:
parent
b1975b8d65
commit
4ac329fb2a
2 changed files with 4 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ exports.plugin = exports.details = void 0;
|
||||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||||
var details = function () { return ({
|
var details = function () { return ({
|
||||||
name: 'Compare File Size Ratio Live',
|
name: 'Compare File Size Ratio Live',
|
||||||
description: "\n Compare either the estimated final size or current output size to the input size and \n give an error if estimated final size or current size surpasses the threshold %.\n\n Works with 'FfmpegCommand', 'HandBrake Custom Arguments', 'Run Classic Transcode' and other flow plugins \n that output a file.\n\n Can be placed anywhere before a plugin which outputs a new file.\n ',\n ",
|
description: "\n Compare either the estimated final size or current output size to the input size and \n give an error if estimated final size or current size surpasses the threshold %.\n\n Works with 'FfmpegCommand', 'HandBrake Custom Arguments', 'Run Classic Transcode' and other flow plugins \n that output a file.\n\n Can be placed anywhere before a plugin which outputs a new file.\n\n You can check if this plugin caused an error by using 'Check Flow Variable' and checking if \n {{{args.variables.liveSizeCompare.error}}} is true.\n ',\n ",
|
||||||
style: {
|
style: {
|
||||||
borderColor: 'orange',
|
borderColor: 'orange',
|
||||||
},
|
},
|
||||||
|
|
@ -128,6 +128,7 @@ var plugin = function (args) {
|
||||||
compareMethod: compareMethod,
|
compareMethod: compareMethod,
|
||||||
thresholdPerc: thresholdPerc,
|
thresholdPerc: thresholdPerc,
|
||||||
checkDelaySeconds: checkDelaySeconds,
|
checkDelaySeconds: checkDelaySeconds,
|
||||||
|
error: false,
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
outputFileObj: args.inputFileObj,
|
outputFileObj: args.inputFileObj,
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,8 @@ var CLI = /** @class */ (function () {
|
||||||
_this.config.jobLog("Ratio: ".concat(ratio, "%"));
|
_this.config.jobLog("Ratio: ".concat(ratio, "%"));
|
||||||
_this.config.jobLog("Ratio is greater than threshold: ".concat(thresholdPerc_1, "%, cancelling job"));
|
_this.config.jobLog("Ratio is greater than threshold: ".concat(thresholdPerc_1, "%, cancelling job"));
|
||||||
_this.cancelled = true;
|
_this.cancelled = true;
|
||||||
|
// @ts-expect-error must exist to be here
|
||||||
|
_this.config.args.variables.liveSizeCompare.error = true;
|
||||||
_this.killThread();
|
_this.killThread();
|
||||||
};
|
};
|
||||||
if (compareMethod === 'estimatedFinalSize'
|
if (compareMethod === 'estimatedFinalSize'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue