Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ass/commit/0e67b5c5c2eb6d74ad69ab1781ae32ce4e6aeb96
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
8 additions and
5 deletions
@ -6,8 +6,11 @@ const { path } = require('./utils');
const { diskFilePath } = require ( './config.json' ) ;
// Thumbnail parameters
const THUMBNAIL _QUALITY = 50 ;
const THUMBNAIL _SIZE = 512 ;
const THUMBNAIL = {
QUALITY : 75 ,
WIDTH : 200 * 2 ,
HEIGHT : 140 * 2 ,
}
/ * *
* Builds a safe escaped ffmpeg command
@ -22,7 +25,7 @@ function getCommand(src, dest) {
'-i' , src , // Input file
'-ss' , '00:00:01.000' , // Timestamp of frame to grab
'-frames:v' , '1' , // Number of frames to grab
'-s' , ` ${ THUMBNAIL _SIZE } x ${ THUMBNAIL _SIZE } ` , // Dimensions of output file
'-s' , ` ${ THUMBNAIL . WIDTH } x ${ THUMBNAIL . HEIGHT } ` , // Dimensions of output file
dest // Output file
] ) ;
}
@ -64,8 +67,8 @@ function getImageThumbnail(file) {
return new Promise ( ( resolve , reject ) =>
Jimp . read ( file . path )
. then ( ( image ) => image
. quality ( THUMBNAIL _ QUALITY)
. resize ( THUMBNAIL _SIZE , THUMBNAIL _SIZE , Jimp . RESIZE _BICUBIC )
. quality ( THUMBNAIL . QUALITY)
. resize ( THUMBNAIL . WIDTH , THUMBNAIL . HEIGHT , Jimp . RESIZE _BICUBIC )
. write ( getNewNamePath ( file . originalname ) ) )
. then ( resolve )
. catch ( reject ) ) ;