fix(node-sub): escape path single quotes correctly
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-04-06 03:51:52 -04:00
parent d47b70c1c7
commit 0ee3f248b8

View file

@ -33,7 +33,7 @@ else {
process.exit(1);
}
const escapePath = (p: string) => p.replaceAll("'", "\\'");
const escapePath = (p: string) => p.replaceAll("'", "'\\''");
function getVideoPath(files: string[]) {
const fileName = DIR.split('/').at(-1) ?? '';
@ -102,7 +102,7 @@ async function main() {
ffProbe(VIDEO, (_e, data) => {
if (!data?.streams) {
console.error('Couldn\'t find streams in video file');
process.exit(1);
process.exit(0);
}
const AVAIL_LANGS = data.streams