Fix ffmpeg checks for windows for playlist page

pull/253/head
aandrew-me 2 years ago
parent 6a1ec15bdc
commit be44ede6d9

@ -48,9 +48,16 @@ if (os.platform() === "win32") {
if (!fs.existsSync(ffmpegPath)) {
try {
ffmpeg = execSync("which ffmpeg", {encoding: "utf8"});
ffmpeg = `"${ffmpeg.trimEnd()}"`;
if (os.platform() === "win32") {
ffmpeg = execSync("where ffmpeg.exe", {encoding: "utf8"});
console.log({ffmpeg})
ffmpeg = `"${ffmpeg.trimEnd()}"`;
} else {
ffmpeg = execSync("which ffmpeg", {encoding: "utf8"});
ffmpeg = `"${ffmpeg.trimEnd()}"`;
}
} catch (error) {
ffmpeg = `""`
console.log(error);
}
}

Loading…
Cancel
Save