From f883887e4a7fd263d21a2844d54f60ec236031ce Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 22 Jun 2025 16:33:00 +0600 Subject: [PATCH] web/queue: don't try to add a remux task if response type is proxy --- web/src/lib/task-manager/queue.ts | 64 ++++++++++++++++--------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/web/src/lib/task-manager/queue.ts b/web/src/lib/task-manager/queue.ts index 164be632..7b507426 100644 --- a/web/src/lib/task-manager/queue.ts +++ b/web/src/lib/task-manager/queue.ts @@ -156,43 +156,45 @@ export const createSavePipeline = ( }); } - let ffargs: string[]; - let workerType: 'encode' | 'remux'; + if (info.type !== "proxy") { + let ffargs: string[]; + let workerType: 'encode' | 'remux'; - if (["merge", "mute", "remux"].includes(info.type)) { - workerType = "remux"; - ffargs = makeRemuxArgs(info); - } else if (info.type === "audio") { - const args = makeAudioArgs(info); + if (["merge", "mute", "remux"].includes(info.type)) { + workerType = "remux"; + ffargs = makeRemuxArgs(info); + } else if (info.type === "audio") { + const args = makeAudioArgs(info); - if (!args) { + if (!args) { + return showError("pipeline.missing_response_data"); + } + + workerType = "encode"; + ffargs = args; + } else if (info.type === "gif") { + workerType = "encode"; + ffargs = makeGifArgs(); + } else { + console.error("unknown work type: " + info.type); return showError("pipeline.missing_response_data"); } - workerType = "encode"; - ffargs = args; - } else if (info.type === "gif") { - workerType = "encode"; - ffargs = makeGifArgs(); - } else { - console.error("unknown work type: " + info.type); - return showError("pipeline.missing_response_data"); - } - - pipeline.push({ - worker: workerType, - workerId: uuid(), - parentId, - dependsOn: pipeline.map(w => w.workerId), - workerArgs: { - files: [], - ffargs, - output: { - type: info.output.type, - format: info.output.filename.split(".").pop(), + pipeline.push({ + worker: workerType, + workerId: uuid(), + parentId, + dependsOn: pipeline.map(w => w.workerId), + workerArgs: { + files: [], + ffargs, + output: { + type: info.output.type, + format: info.output.filename.split(".").pop(), + }, }, - }, - }); + }); + } addItem({ id: parentId,