From bfdec616eb39a488d3ecc673f1849606ede83547 Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Sun, 25 Jul 2021 12:00:00 +0200 Subject: [PATCH] [scraper] fix us country name --- scraper/lib/torrent.js | 2 +- scraper/lib/torrentFiles.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scraper/lib/torrent.js b/scraper/lib/torrent.js index f71705e..4f42f9f 100644 --- a/scraper/lib/torrent.js +++ b/scraper/lib/torrent.js @@ -167,7 +167,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 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; diff --git a/scraper/lib/torrentFiles.js b/scraper/lib/torrentFiles.js index c007228..ce3c146 100644 --- a/scraper/lib/torrentFiles.js +++ b/scraper/lib/torrentFiles.js @@ -338,6 +338,7 @@ function decomposeEpisodeTitleFiles(torrent, files, metadata) { function getTimeZoneOffset(country) { switch (country) { + case 'United States': case 'USA': return '-08:00'; default: