mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-02-21 20:59:04 +00:00
Use top variable over config
This commit is contained in:
parent
9a4c0d5cea
commit
cf2593465a
@ -222,8 +222,8 @@ self.generateThumbs = async (name, extname, force) => {
|
||||
// If image extension
|
||||
if (self.imageExts.includes(extname)) {
|
||||
const resizeOptions = {
|
||||
width: ${config.uploads.generateThumbs.size},
|
||||
height: ${config.uploads.generateThumbs.size},
|
||||
width: ${self.thumbSize},
|
||||
height: ${self.thumbSize},
|
||||
fit: 'contain',
|
||||
background: {
|
||||
r: 0,
|
||||
@ -270,7 +270,7 @@ self.generateThumbs = async (name, extname, force) => {
|
||||
.outputOptions([
|
||||
`-ss ${duration * 20 / 100}`,
|
||||
'-vframes 1',
|
||||
`-vf scale=${config.uploads.generateThumbs.size}:${config.uploads.generateThumbs.size}:force_original_aspect_ratio=decrease`
|
||||
`-vf scale=${self.thumbSize}:${self.thumbSize}:force_original_aspect_ratio=decrease`
|
||||
])
|
||||
.on('error', async error => {
|
||||
// Try to unlink thumbnail,
|
||||
|
Loading…
Reference in New Issue
Block a user