From 61318fe145a1aefe0e9e4ddff2ecca4363c0bde3 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Tue, 29 Aug 2023 08:37:19 +0100 Subject: [PATCH] Allow original container option --- .../handbrake/handbrakeCustomArguments/1.0.0/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/1.0.0/index.ts index 3550a08..b5485dc 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/1.0.0/index.ts @@ -5,6 +5,7 @@ import { IpluginInputArgs, IpluginOutputArgs, } from '../../../../FlowHelpers/1.0.0/interfaces/interfaces'; +import { getContainer } from '../../../../FlowHelpers/1.0.0/fileUtils'; /* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */ const details = ():IpluginDetails => ({ @@ -43,6 +44,7 @@ const details = ():IpluginDetails => ({ inputUI: { type: 'dropdown', options: [ + 'original', 'mkv', 'mp4', 'm4v', @@ -70,7 +72,12 @@ const plugin = async (args:IpluginInputArgs):Promise => { args.inputs = lib.loadDefaultValues(args.inputs, details); const customArguments = String(args.inputs.customArguments); - const container = String(args.inputs.container); + + let container = String(args.inputs.container); + + if (container === 'original') { + container = getContainer(args.inputFileObj._id); + } const outputFilePath = `${args.workDir}/tempFile_${new Date().getTime()}.${container}`;