From 88227593f51212c618358f94bbde87e964fdc00d Mon Sep 17 00:00:00 2001 From: "jeanchristophe.mqt@gmail.com" Date: Sat, 10 Feb 2024 20:42:56 +0100 Subject: [PATCH] Corrected final check --- .../tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js | 2 +- .../tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js index 7df7d73..030faf8 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.js @@ -227,7 +227,7 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function case 1: newPathOutput = _d.sent(); return [2 /*return*/, { - outputFileObj: newPathOutput.isSuccessful ? __assign(__assign({}, args.inputFileObj), { _id: newPathOutput.newPath }) : args.inputFileObj, + outputFileObj: newPathOutput.isSuccessful && newPathOutput.newPath ? __assign(__assign({}, args.inputFileObj), { _id: newPathOutput.newPath }) : args.inputFileObj, outputNumber: newPathOutput.isSuccessful ? 1 : 2, variables: args.variables, }]; diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts index 1a0d08f..bc606a6 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/applyRadarrOrSonarrNamingPolicy/1.0.0/index.ts @@ -191,7 +191,7 @@ const plugin = async (args: IpluginInputArgs): Promise => { const newPathOutput = await getNewPath(arr === 'radarr' ? getNewPathTypes.radarr : getNewPathTypes.sonarr); return { - outputFileObj: newPathOutput.isSuccessful ? { ...args.inputFileObj, _id: newPathOutput.newPath } : args.inputFileObj, + outputFileObj: newPathOutput.isSuccessful && newPathOutput.newPath ? { ...args.inputFileObj, _id: newPathOutput.newPath } : args.inputFileObj, outputNumber: newPathOutput.isSuccessful ? 1 : 2, variables: args.variables, };