[scraper] do not pass date year to name-to-imdb

This commit is contained in:
TheBeastLT
2020-10-03 14:25:23 +02:00
parent ad7ce57c36
commit 2be400baba
3 changed files with 3 additions and 4 deletions

View File

@@ -103,8 +103,8 @@ async function getImdbId(info, type) {
return cacheWrapImdbId(key,
() => new Promise((resolve, reject) => {
nameToImdb({ name, year, type }, function (err, res) {
if (res && !info.date) {
nameToImdb({ name, year: info.year, type }, function (err, res) {
if (res) {
resolve(res);
} else {
reject(err || new Error('failed imdbId search'));

View File

@@ -69,7 +69,6 @@ async function processTorrentRecord(record) {
console.warn(`Incorrect upload date for [${torrentFound.infoHash}] ${torrentFound.name}`);
return;
}
if (await checkAndUpdateTorrent(torrentFound)) {
return torrentFound;
}

View File

@@ -7,7 +7,7 @@ const { getRandomUserAgent } = require('./../../lib/request_helper');
const defaultProxies = [
'https://eztv.io'
];
const defaultTimeout = 20000;
const defaultTimeout = 40000;
const minDelay = 3000;
const jitterDelay = minDelay;
const limit = 100;