fix command generation
This commit is contained in:
parent
baf812d6ad
commit
c091ff72ba
|
@ -105,6 +105,7 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => {
|
||||||
const eid = edgeIds[i.id];
|
const eid = edgeIds[i.id];
|
||||||
if (eid) {
|
if (eid) {
|
||||||
if (typeof eid == "string" && eid.includes(":")) cmd.weight = -1000;
|
if (typeof eid == "string" && eid.includes(":")) cmd.weight = -1000;
|
||||||
|
else cmd.weight = eid;
|
||||||
cmd.in.push(eid);
|
cmd.in.push(eid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +116,6 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => {
|
||||||
const eid = edgeIds[o.id];
|
const eid = edgeIds[o.id];
|
||||||
if (eid) {
|
if (eid) {
|
||||||
if (typeof eid == "string" && eid.includes("out")) cmd.weight = 1000;
|
if (typeof eid == "string" && eid.includes("out")) cmd.weight = 1000;
|
||||||
else cmd.weight = eid;
|
|
||||||
cmd.out.push(eid);
|
cmd.out.push(eid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => {
|
||||||
let fg = `"${filtergraph.join(";")}"`;
|
let fg = `"${filtergraph.join(";")}"`;
|
||||||
|
|
||||||
// this crazy thing replaces stuff like [1];[1] with a comma!
|
// this crazy thing replaces stuff like [1];[1] with a comma!
|
||||||
fg = fg.replaceAll(/(\[\d+\]);\1(?!\[)/g, ",");
|
fg = fg.replaceAll(/(?<!])(\[\d+\]);\1(?!\[)/g, ",");
|
||||||
|
|
||||||
finalCommand.push("-filter_complex", fg);
|
finalCommand.push("-filter_complex", fg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue