mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 09:41:33 +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: {
|
generateThumbs: {
|
||||||
image: true,
|
image: true,
|
||||||
video: false,
|
video: false,
|
||||||
placeholder: null
|
placeholder: null,
|
||||||
|
size: 200
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,7 +28,7 @@ const self = {
|
|||||||
|
|
||||||
imageExts: ['.gif', '.jpeg', '.jpg', '.png', '.svg', '.tif', '.tiff', '.webp'],
|
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'],
|
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),
|
ffprobe: promisify(ffmpeg.ffprobe),
|
||||||
|
|
||||||
albumsCache: {},
|
albumsCache: {},
|
||||||
@ -219,8 +219,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: 200,
|
width: ${self.thumbSize},
|
||||||
height: 200,
|
height: ${self.thumbSize},
|
||||||
fit: 'contain',
|
fit: 'contain',
|
||||||
background: {
|
background: {
|
||||||
r: 0,
|
r: 0,
|
||||||
@ -270,7 +270,7 @@ self.generateThumbs = async (name, extname, force) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
filter: 'scale',
|
filter: 'scale',
|
||||||
options: '200:200:force_original_aspect_ratio=decrease'
|
options: `${self.thumbSize}:${self.thumbSize}:force_original_aspect_ratio=decrease`
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
.output(thumbname)
|
.output(thumbname)
|
||||||
|
Loading…
Reference in New Issue
Block a user