From f78261a889c62024727a8cc492d2f0d0b4dd1f72 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Tue, 24 Nov 2020 19:22:36 +0100 Subject: [PATCH] [scraper] include underscore in redundant file regex --- 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 f4a5e8e..dc91152 100644 --- a/scraper/lib/torrent.js +++ b/scraper/lib/torrent.js @@ -131,7 +131,7 @@ function filterVideos(files) { const isSample = video => video.path.match(/sample/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) + const isAnimeExtra = video => video.path.match(/(?:\b|_)(?:NC)?(?:ED|OP|PV)(?:v?\d\d?)?(?:\b|_)/i) && maxSize / parseInt(video.size) > minAnimeExtraRatio; return videos .filter(video => !isSample(video))