Fix:Check failed ffmpeg image command +additional errors logs #239

This commit is contained in:
advplyr 2021-12-14 15:19:23 -06:00
parent ac4a0830a0
commit b18af414b6
2 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,8 @@ class CacheManager {
await fs.ensureDir(this.CoverCachePath)
let writtenFile = await resizeImage(audiobook.book.coverFullPath, path, width, height)
if (!writtenFile) return res.sendStatus(400)
var readStream = fs.createReadStream(writtenFile)
readStream.pipe(res)
}

View File

@ -107,7 +107,7 @@ async function resizeImage(filePath, outputPath, width, height) {
Logger.debug(`[FfmpegHelpers] Resize Image Cmd: ${cmd}`)
})
ffmpeg.on('error', (err, stdout, stderr) => {
Logger.error(`[FfmpegHelpers] Resize Image Error ${err}`)
Logger.error(`[FfmpegHelpers] Resize Image Error ${err} ${stdout} ${stderr}`)
resolve(false)
})
ffmpeg.on('end', () => {