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 image extension
|
||||||
if (self.imageExts.includes(extname)) {
|
if (self.imageExts.includes(extname)) {
|
||||||
const resizeOptions = {
|
const resizeOptions = {
|
||||||
width: ${config.uploads.generateThumbs.size},
|
width: ${self.thumbSize},
|
||||||
height: ${config.uploads.generateThumbs.size},
|
height: ${self.thumbSize},
|
||||||
fit: 'contain',
|
fit: 'contain',
|
||||||
background: {
|
background: {
|
||||||
r: 0,
|
r: 0,
|
||||||
@ -270,7 +270,7 @@ self.generateThumbs = async (name, extname, force) => {
|
|||||||
.outputOptions([
|
.outputOptions([
|
||||||
`-ss ${duration * 20 / 100}`,
|
`-ss ${duration * 20 / 100}`,
|
||||||
'-vframes 1',
|
'-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 => {
|
.on('error', async error => {
|
||||||
// Try to unlink thumbnail,
|
// Try to unlink thumbnail,
|
||||||
|
Loading…
Reference in New Issue
Block a user