|
|
|
@ -176,7 +176,7 @@ app.post("/download", async (req, res) => {
|
|
|
|
(error, stdout, stderr) => {
|
|
|
|
(error, stdout, stderr) => {
|
|
|
|
if (error) {
|
|
|
|
if (error) {
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
|
} else{
|
|
|
|
} else if (stderr){
|
|
|
|
console.log("video saved");
|
|
|
|
console.log("video saved");
|
|
|
|
// Clear temp dir
|
|
|
|
// Clear temp dir
|
|
|
|
fs.readdirSync(tempDir).forEach((f) =>
|
|
|
|
fs.readdirSync(tempDir).forEach((f) =>
|
|
|
|
@ -184,6 +184,9 @@ app.post("/download", async (req, res) => {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
io.to(socketId).emit("saved", `${downloadDir}`);
|
|
|
|
io.to(socketId).emit("saved", `${downloadDir}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (stdout){
|
|
|
|
|
|
|
|
console.log("stdout this time")
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|