[scraper] small adjustments

This commit is contained in:
TheBeastLT
2020-11-29 22:23:09 +01:00
parent f78261a889
commit e15b1f3ce9
4 changed files with 28 additions and 9 deletions

View File

@@ -126,7 +126,7 @@ function filterVideos(files) {
const videos = files.filter(file => isVideo(file.path));
const maxSize = Math.max(...videos.map(video => video.size));
const minSampleRatio = videos.length <= 3 ? 5 : 10;
const minAnimeExtraRatio = 7;
const minAnimeExtraRatio = 5;
const minRedundantRatio = videos.length <= 3 ? 30 : Number.MAX_VALUE;
const isSample = video => video.path.match(/sample/i) && maxSize / parseInt(video.size) > minSampleRatio;
const isRedundant = video => maxSize / parseInt(video.size) > minRedundantRatio;