mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] filter bonus videos
This commit is contained in:
@@ -168,7 +168,7 @@ function filterVideos(files) {
|
|||||||
const minSampleRatio = videos.length <= 3 ? 5 : 10;
|
const minSampleRatio = videos.length <= 3 ? 5 : 10;
|
||||||
const minAnimeExtraRatio = 5;
|
const minAnimeExtraRatio = 5;
|
||||||
const minRedundantRatio = videos.length <= 3 ? 30 : Number.MAX_VALUE;
|
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 isRedundant = video => maxSize / parseInt(video.size) > minRedundantRatio;
|
||||||
const isExtra = video => video.path.match(/extras?\//i);
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user