mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 01:18:27 +00:00
web/queue: don't try to add a remux task if response type is proxy
This commit is contained in:
parent
61e0862b10
commit
f883887e4a
@ -156,43 +156,45 @@ export const createSavePipeline = (
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let ffargs: string[];
|
if (info.type !== "proxy") {
|
||||||
let workerType: 'encode' | 'remux';
|
let ffargs: string[];
|
||||||
|
let workerType: 'encode' | 'remux';
|
||||||
|
|
||||||
if (["merge", "mute", "remux"].includes(info.type)) {
|
if (["merge", "mute", "remux"].includes(info.type)) {
|
||||||
workerType = "remux";
|
workerType = "remux";
|
||||||
ffargs = makeRemuxArgs(info);
|
ffargs = makeRemuxArgs(info);
|
||||||
} else if (info.type === "audio") {
|
} else if (info.type === "audio") {
|
||||||
const args = makeAudioArgs(info);
|
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");
|
return showError("pipeline.missing_response_data");
|
||||||
}
|
}
|
||||||
|
|
||||||
workerType = "encode";
|
pipeline.push({
|
||||||
ffargs = args;
|
worker: workerType,
|
||||||
} else if (info.type === "gif") {
|
workerId: uuid(),
|
||||||
workerType = "encode";
|
parentId,
|
||||||
ffargs = makeGifArgs();
|
dependsOn: pipeline.map(w => w.workerId),
|
||||||
} else {
|
workerArgs: {
|
||||||
console.error("unknown work type: " + info.type);
|
files: [],
|
||||||
return showError("pipeline.missing_response_data");
|
ffargs,
|
||||||
}
|
output: {
|
||||||
|
type: info.output.type,
|
||||||
pipeline.push({
|
format: info.output.filename.split(".").pop(),
|
||||||
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({
|
addItem({
|
||||||
id: parentId,
|
id: parentId,
|
||||||
|
Loading…
Reference in New Issue
Block a user