mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 01:31:34 +00:00
Merge branch 'patch-3' of https://github.com/camjac251/lolisafe into camjac251-patch-3
This commit is contained in:
commit
46c84db64f
@ -418,7 +418,8 @@ module.exports = {
|
||||
generateThumbs: {
|
||||
image: true,
|
||||
video: false,
|
||||
placeholder: null
|
||||
placeholder: null,
|
||||
size: 200
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -28,7 +28,7 @@ const self = {
|
||||
|
||||
imageExts: ['.gif', '.jpeg', '.jpg', '.png', '.svg', '.tif', '.tiff', '.webp'],
|
||||
videoExts: ['.3g2', '.3gp', '.asf', '.avchd', '.avi', '.divx', '.evo', '.flv', '.h264', '.h265', '.hevc', '.m2p', '.m2ts', '.m4v', '.mk3d', '.mkv', '.mov', '.mp4', '.mpeg', '.mpg', '.mxf', '.ogg', '.ogv', '.ps', '.qt', '.rmvb', '.ts', '.vob', '.webm', '.wmv'],
|
||||
|
||||
thumbSize: config.uploads.generateThumbs.size || 200,
|
||||
ffprobe: promisify(ffmpeg.ffprobe),
|
||||
|
||||
albumsCache: {},
|
||||
@ -219,8 +219,8 @@ self.generateThumbs = async (name, extname, force) => {
|
||||
// If image extension
|
||||
if (self.imageExts.includes(extname)) {
|
||||
const resizeOptions = {
|
||||
width: 200,
|
||||
height: 200,
|
||||
width: ${self.thumbSize},
|
||||
height: ${self.thumbSize},
|
||||
fit: 'contain',
|
||||
background: {
|
||||
r: 0,
|
||||
@ -270,7 +270,7 @@ self.generateThumbs = async (name, extname, force) => {
|
||||
},
|
||||
{
|
||||
filter: 'scale',
|
||||
options: '200:200:force_original_aspect_ratio=decrease'
|
||||
options: `${self.thumbSize}:${self.thumbSize}:force_original_aspect_ratio=decrease`
|
||||
}
|
||||
])
|
||||
.output(thumbname)
|
||||
|
Loading…
Reference in New Issue
Block a user