mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-28 17:49:06 +01:00
Fix:Check failed ffmpeg image command +additional errors logs #239
This commit is contained in:
parent
ac4a0830a0
commit
b18af414b6
@ -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)
|
||||
}
|
||||
|
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user