fix: pass inputFileObj to all CLI constructors; add release workflow and README
Release Plugins / Package & Release (push) Successful in 24s

This commit is contained in:
PickleRick committed 2026-09-19 12:34:04 +02:00
1 parent c2074be826
commit 55a9fc9716
7 files changed
+391 -9

No files matched your search

@@ -1,4 +1,4 @@
'use strict';
'use strict';
const path = require('path');
const fs = require('fs');
@@ -76,6 +76,7 @@ const plugin = async (args) => {
],
WorkDir: workDir,
jobLog,
inputFileObj,
});
const { cliExitCode } = await cli.runCli();
@@ -1,4 +1,4 @@
'use strict';
'use strict';
const path = require('path');
const fs = require('fs');
@@ -79,9 +79,11 @@ const buildSuffix = (lang, stream) => {
return parts.join('.');
};
const runFFmpeg = async (spawnArgs, workDir, ffmpegPath, jobLog) => {
const runFFmpeg = async (spawnArgs, workDir, ffmpegPath, jobLog, inputFileObj) => {
const { CLI } = require('../../../../FlowHelpers/1.0.0/cliUtils');
const cli = new CLI({ cli: ffmpegPath, spawnArgs, WorkDir: workDir, jobLog });
const cli = new CLI({
cli: ffmpegPath, spawnArgs, WorkDir: workDir, jobLog, inputFileObj,
});
return cli.runCli();
};
@@ -127,7 +129,7 @@ const plugin = async (args) => {
if (TEXT_CODECS.has(codec)) {
const { cliExitCode } = await runFFmpeg(
['-y', '-i', inputFile, '-map', `0:${stream.index}`, '-c:s', 'srt', outSrt],
workDir, args.ffmpegPath, jobLog,
workDir, args.ffmpegPath, jobLog, inputFileObj,
);
if (cliExitCode !== 0) {
jobLog(`[extractSubtitlesAndOcr] WARNING: FFmpeg failed for stream #${stream.index} (exit ${cliExitCode}).\n`);
@@ -144,7 +146,7 @@ const plugin = async (args) => {
// Step 1: Extract to .sup
const { cliExitCode: extractExit } = await runFFmpeg(
['-y', '-i', inputFile, '-map', `0:${stream.index}`, '-c:s', 'copy', tmpSup],
workDir, args.ffmpegPath, jobLog,
workDir, args.ffmpegPath, jobLog, inputFileObj,
);
if (extractExit !== 0) {
@@ -164,6 +166,7 @@ const plugin = async (args) => {
],
WorkDir: workDir,
jobLog,
inputFileObj,
});
const { cliExitCode: seExit } = await seCli.runCli();
@@ -1,4 +1,4 @@
'use strict';
'use strict';
const path = require('path');
const fs = require('fs');
@@ -49,6 +49,7 @@ const plugin = async (args) => {
spawnArgs: [inputFile, 'chapters', xmlPath],
WorkDir: workDir,
jobLog,
inputFileObj,
});
const { cliExitCode } = await cli.runCli();
@@ -1,4 +1,4 @@
'use strict';
'use strict';
const path = require('path');
const fs = require('fs');
@@ -177,6 +177,7 @@ const plugin = async (args) => {
],
WorkDir: workDir,
jobLog,
inputFileObj,
});
const { cliExitCode: pass1Exit } = await pass1Cli.runCli();
@@ -207,6 +208,7 @@ const plugin = async (args) => {
],
WorkDir: workDir,
jobLog,
inputFileObj,
});
const { cliExitCode: pass2Exit } = await pass2Cli.runCli();