mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 07:56:23 +00:00
Updated utilsController.js
Used .some() instead of .find(). Probably a tiny bit more efficient.
This commit is contained in:
parent
f4fa6b6a96
commit
51f12ad900
@ -228,7 +228,7 @@ utilsController.generateThumbs = (name, force) => {
|
||||
if (error) return reject(error)
|
||||
|
||||
// Skip files that do not have video streams/channels
|
||||
if (!metadata.streams || !metadata.streams.find(s => s.codec_type === 'video'))
|
||||
if (!metadata.streams || !metadata.streams.some(s => s.codec_type === 'video'))
|
||||
return reject(new Error('File does not contain any video stream'))
|
||||
|
||||
ffmpeg(input)
|
||||
|
Loading…
Reference in New Issue
Block a user