From f73157eb82db59ab2af302ae680482c3e1c39421 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Wed, 8 Nov 2023 05:58:01 +0000 Subject: [PATCH] Add better estimates for 2 pass hb encoding --- FlowPlugins/FlowHelpers/1.0.0/cliParsers.js | 6 ++++++ FlowPluginsTs/FlowHelpers/1.0.0/cliParsers.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/FlowPlugins/FlowHelpers/1.0.0/cliParsers.js b/FlowPlugins/FlowHelpers/1.0.0/cliParsers.js index 27d860114..885ab1760 100644 --- a/FlowPlugins/FlowHelpers/1.0.0/cliParsers.js +++ b/FlowPlugins/FlowHelpers/1.0.0/cliParsers.js @@ -21,6 +21,12 @@ var handbrakeParser = function (_a) { percentage = outputNum; } } + if (str.includes('task 1 of 2')) { + percentage /= 2; + } + else if (str.includes('task 2 of 2')) { + percentage = 50 + (percentage / 2); + } return percentage; }; exports.handbrakeParser = handbrakeParser; diff --git a/FlowPluginsTs/FlowHelpers/1.0.0/cliParsers.ts b/FlowPluginsTs/FlowHelpers/1.0.0/cliParsers.ts index 8e79cc66a..b45cdf08f 100644 --- a/FlowPluginsTs/FlowHelpers/1.0.0/cliParsers.ts +++ b/FlowPluginsTs/FlowHelpers/1.0.0/cliParsers.ts @@ -28,6 +28,12 @@ const handbrakeParser = ({ } } + if (str.includes('task 1 of 2')) { + percentage /= 2; + } else if (str.includes('task 2 of 2')) { + percentage = 50 + (percentage / 2); + } + return percentage; };