diff --git a/FlowPlugins/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.js index 7269f6721..c3eb11b40 100644 --- a/FlowPlugins/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.js @@ -4,7 +4,7 @@ exports.plugin = exports.details = void 0; /* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */ var details = function () { return ({ 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: { borderColor: 'orange', }, @@ -128,6 +128,7 @@ var plugin = function (args) { compareMethod: compareMethod, thresholdPerc: thresholdPerc, checkDelaySeconds: checkDelaySeconds, + error: false, }; return { outputFileObj: args.inputFileObj, diff --git a/FlowPlugins/FlowHelpers/1.0.0/cliUtils.js b/FlowPlugins/FlowHelpers/1.0.0/cliUtils.js index f62fa852b..2d9931b67 100644 --- a/FlowPlugins/FlowHelpers/1.0.0/cliUtils.js +++ b/FlowPlugins/FlowHelpers/1.0.0/cliUtils.js @@ -173,6 +173,8 @@ var CLI = /** @class */ (function () { _this.config.jobLog("Ratio: ".concat(ratio, "%")); _this.config.jobLog("Ratio is greater than threshold: ".concat(thresholdPerc_1, "%, cancelling job")); _this.cancelled = true; + // @ts-expect-error must exist to be here + _this.config.args.variables.liveSizeCompare.error = true; _this.killThread(); }; if (compareMethod === 'estimatedFinalSize' diff --git a/FlowPluginsTs/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.ts index c6039204b..4051238c3 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/file/compareFileSizeRatioLive/1.0.0/index.ts @@ -15,6 +15,9 @@ const details = (): IpluginDetails => ({ that output a file. Can be placed anywhere before a plugin which outputs a new file. + + You can check if this plugin caused an error by using 'Check Flow Variable' and checking if + {{{args.variables.liveSizeCompare.error}}} is true. ', `, style: { @@ -155,6 +158,7 @@ const plugin = (args: IpluginInputArgs):IpluginOutputArgs => { compareMethod, thresholdPerc, checkDelaySeconds, + error: false, }; return { diff --git a/FlowPluginsTs/FlowHelpers/1.0.0/cliUtils.ts b/FlowPluginsTs/FlowHelpers/1.0.0/cliUtils.ts index f51b4cd3f..59f9e243e 100644 --- a/FlowPluginsTs/FlowHelpers/1.0.0/cliUtils.ts +++ b/FlowPluginsTs/FlowHelpers/1.0.0/cliUtils.ts @@ -188,6 +188,8 @@ class CLI { this.config.jobLog(`Ratio is greater than threshold: ${thresholdPerc}%, cancelling job`); this.cancelled = true; + // @ts-expect-error must exist to be here + this.config.args.variables.liveSizeCompare.error = true; this.killThread(); }; diff --git a/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts b/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts index 0d1c6c8ca..d39b3a0da 100644 --- a/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts +++ b/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts @@ -101,6 +101,7 @@ export interface IliveSizeCompare { compareMethod: string, thresholdPerc: number, checkDelaySeconds: number, + error: boolean, } export interface Ivariables {