fix(node-sub): escape path single quotes correctly
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
d47b70c1c7
commit
0ee3f248b8
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ else {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const escapePath = (p: string) => p.replaceAll("'", "\\'");
|
const escapePath = (p: string) => p.replaceAll("'", "'\\''");
|
||||||
|
|
||||||
function getVideoPath(files: string[]) {
|
function getVideoPath(files: string[]) {
|
||||||
const fileName = DIR.split('/').at(-1) ?? '';
|
const fileName = DIR.split('/').at(-1) ?? '';
|
||||||
|
@ -102,7 +102,7 @@ async function main() {
|
||||||
ffProbe(VIDEO, (_e, data) => {
|
ffProbe(VIDEO, (_e, data) => {
|
||||||
if (!data?.streams) {
|
if (!data?.streams) {
|
||||||
console.error('Couldn\'t find streams in video file');
|
console.error('Couldn\'t find streams in video file');
|
||||||
process.exit(1);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVAIL_LANGS = data.streams
|
const AVAIL_LANGS = data.streams
|
||||||
|
|
Loading…
Reference in a new issue