New Commit

This commit is contained in:
mrcanelas
2021-09-10 13:45:59 -03:00
committed by TheBeastLT
parent ae9baeb2dd
commit 0ccb65391a
19 changed files with 1905 additions and 1 deletions

View File

@@ -170,7 +170,7 @@ function filterVideos(files) {
const minSampleRatio = videos.length <= 3 ? 3 : 10;
const minAnimeExtraRatio = 5;
const minRedundantRatio = videos.length <= 3 ? 30 : Number.MAX_VALUE;
const isSample = video => video.path.match(/sample|bonus/i) && maxSize / parseInt(video.size) > minSampleRatio;
const isSample = video => video.path.match(/sample|bonus|promo/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)

View File

@@ -78,6 +78,7 @@ async function parseSeriesFiles(torrent, parsedName, metadata) {
.then(videos => videos
.reduce((a, b) => a.concat(b), [])
.map(video => isFeaturette(video) ? clearInfoFields(video) : video))
return { contents, videos: parsedVideos, subtitles };
}