Updated utilsController.js

Suppress more ffmpeg/ffprobe error messages
This commit is contained in:
Bobby Wibowo 2020-04-19 21:52:34 +07:00
parent 48172b0805
commit dc59476592
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -292,12 +292,15 @@ self.generateThumbs = async (name, extname, force) => {
return false
}
} catch (error) {
// TODO: Parse ffmpeg/ffprobe errors into concise error messages (get rid of versions info)
// Suppress error logging for errors matching these patterns
const errorString = error.toString()
const suppress = [
/Input file contains unsupported image format/,
/Invalid data found when processing input/,
/File does not have valid required data/
/File does not have valid required data/,
/Could not find codec parameters/,
/Duplicate element/
]
if (!suppress.some(t => t.test(errorString)))