From 63c4d6252391e0791dacc3284a70a85878908bd9 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Sun, 21 Mar 2021 21:37:33 +0100 Subject: [PATCH] [scraper] filter bonus videos --- scraper/lib/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraper/lib/torrent.js b/scraper/lib/torrent.js index 82974be..39d0d72 100644 --- a/scraper/lib/torrent.js +++ b/scraper/lib/torrent.js @@ -168,7 +168,7 @@ function filterVideos(files) { const minSampleRatio = videos.length <= 3 ? 5 : 10; 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 isSample = video => video.path.match(/sample|bonus/i) && maxSize / parseInt(video.size) > minSampleRatio; const isRedundant = video => maxSize / parseInt(video.size) > minRedundantRatio; const isExtra = video => video.path.match(/extras?\//i); const isAnimeExtra = video => video.path.match(/(?:\b|_)(?:NC)?(?:ED|OP|PV)(?:v?\d\d?)?(?:\b|_)/i)