Add catch for failed snap on video file
parent
7228a70937
commit
06450c5e7e
|
@ -886,10 +886,14 @@ module.exports = (s,config,lang) => {
|
||||||
try{
|
try{
|
||||||
await fsP.stat(framePath)
|
await fsP.stat(framePath)
|
||||||
}catch(err){
|
}catch(err){
|
||||||
const frameBuffer = await getVideoFrameAsJpeg(videoPath, secondsIn);
|
try{
|
||||||
await fsP.mkdir(location, { recursive: true })
|
const frameBuffer = await getVideoFrameAsJpeg(videoPath, secondsIn);
|
||||||
await fsP.writeFile(framePath, frameBuffer)
|
await fsP.mkdir(location, { recursive: true })
|
||||||
await s.createTimelapseFrameAndInsert(activeMonitor,location,frameFilename, frameTime._d)
|
await fsP.writeFile(framePath, frameBuffer)
|
||||||
|
await s.createTimelapseFrameAndInsert(activeMonitor,location,frameFilename, frameTime._d)
|
||||||
|
}catch(err){
|
||||||
|
console.error(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// console.error('Completed Saving Frame from New Video!', framePath)
|
// console.error('Completed Saving Frame from New Video!', framePath)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue