This commit is contained in:
Flummi 2016-08-21 12:35:14 +02:00
parent 96ef7a2e4b
commit c7d8783906

View File

@ -218,7 +218,7 @@ var dl = (url, dest, cb) => {
probe(dest+"."+cfg.allowedMimes[response.headers['content-type']], (err, probeData) => {
if(probeData.streams[0].height !== undefined || probeData.streams[0].width !== undefined) {
if(probeData.streams[0].height <= cfg.minRes || probeData.streams[0].width <= cfg.minRes) {
cb({'status':false, 'msg':'f0ck! your file is too large ('+probeData.streams[0].width+' x '+probeData.streams[0].height+'), min '+cfg.minRes+' x '+cfg.minRes+' required', 'type':1});
cb({'status':false, 'msg':'f0ck! your file is too small ('+probeData.streams[0].width+' x '+probeData.streams[0].height+'), min '+cfg.minRes+' x '+cfg.minRes+' required', 'type':1});
}
else
cb({'status':true, 'msg':'downloaded '+dest, 'type':1, 'infos':{'mime':response.headers['content-type'], 'size':response.headers['content-length'], 'ext':cfg.allowedMimes[response.headers['content-type']]}});