From 68c129e20f9905b3c2bd2f0fa20bb22d74c7700a Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 27 Aug 2023 09:57:43 +0100 Subject: [PATCH 1/2] Handle no result from classic plugin --- .../classic/runClassicFilterPlugin/1.0.0/index.js | 2 +- .../classic/runClassicTranscodePlugin/1.0.0/index.js | 8 ++++++++ .../classic/runClassicFilterPlugin/1.0.0/index.ts | 2 +- .../classic/runClassicTranscodePlugin/1.0.0/index.ts | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.js index 2b7b255..d2e5320 100644 --- a/FlowPlugins/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.js @@ -127,7 +127,7 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function case 4: result = _a.sent(); args.jobLog(JSON.stringify(result, null, 2)); - outputNumber = result.processFile ? 1 : 2; + outputNumber = (result === null || result === void 0 ? void 0 : result.processFile) ? 1 : 2; return [2 /*return*/, { outputFileObj: args.inputFileObj, outputNumber: outputNumber, diff --git a/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.js index f82d88b..26ff999 100644 --- a/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.js @@ -139,6 +139,14 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function case 4: result = _d.sent(); args.jobLog(JSON.stringify(result, null, 2)); + if (!result) { + args.jobLog('No result from classic plugin. Continuing to next flow plugin.'); + return [2 /*return*/, { + outputFileObj: args.inputFileObj, + outputNumber: 1, + variables: args.variables, + }]; + } // --- Backwards compatibility------------ if (result.handBrakeMode) { result.handbrakeMode = result.handBrakeMode; diff --git a/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.ts index b7f7e2f..a8a773e 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicFilterPlugin/1.0.0/index.ts @@ -100,7 +100,7 @@ const plugin = async (args: IpluginInputArgs): Promise => { args.jobLog(JSON.stringify(result, null, 2)); - const outputNumber = result.processFile ? 1 : 2; + const outputNumber = result?.processFile ? 1 : 2; return { outputFileObj: args.inputFileObj, diff --git a/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.ts index c70489a..0fbd06a 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/classic/runClassicTranscodePlugin/1.0.0/index.ts @@ -103,6 +103,15 @@ const plugin = async (args: IpluginInputArgs): Promise => { args.jobLog(JSON.stringify(result, null, 2)); + if (!result) { + args.jobLog('No result from classic plugin. Continuing to next flow plugin.'); + return { + outputFileObj: args.inputFileObj, + outputNumber: 1, + variables: args.variables, + }; + } + // --- Backwards compatibility------------ if (result.handBrakeMode) { result.handbrakeMode = result.handBrakeMode; From f0ffe40fb11bec5806434a8b40e0d1ef8d882874 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sun, 27 Aug 2023 09:57:50 +0100 Subject: [PATCH 2/2] Update start text --- .../ffmpegCommand/ffmpegCommandStart/1.0.0/index.js | 5 +++-- .../ffmpegCommand/ffmpegCommandStart/1.0.0/index.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.js index 206acdf..8dc8659 100644 --- a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.js @@ -15,8 +15,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.plugin = exports.details = void 0; /* eslint-disable no-param-reassign */ var details = function () { return ({ - name: 'Start', - description: 'Start FFmpeg Command', + name: 'Begin Command', + description: 'Begin creating the FFmpeg command for the current working file.' + + ' Should be used before any other FFmpeg command plugins.', style: { borderColor: 'green', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.ts index 83430cf..22a0426 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandStart/1.0.0/index.ts @@ -9,8 +9,9 @@ import { Istreams } from '../../../../FlowHelpers/1.0.0/interfaces/synced/IFileO /* eslint-disable no-param-reassign */ const details = () :IpluginDetails => ({ - name: 'Start', - description: 'Start FFmpeg Command', + name: 'Begin Command', + description: 'Begin creating the FFmpeg command for the current working file.' + + ' Should be used before any other FFmpeg command plugins.', style: { borderColor: 'green', },