fixed Vibrant attempting to run for videos

pull/19/head
tycrek 4 years ago
parent fbf484e8aa
commit 8007cef283
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -138,7 +138,7 @@ function startup() {
};
// Generate a thumbnail & get the Vibrant colour
Promise.all([Thumbnail(req.file), Vibrant(req.file)])
Promise.all([Thumbnail(req.file), (req.file.mimetype.includes('video') ? randomHexColour() : Vibrant(req.file))])
.then(([thumbnail, vibrant]) => (req.file.thumbnail = thumbnail, req.file.vibrant = vibrant))
.catch(console.error)

Loading…
Cancel
Save