mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] do not pass date year to name-to-imdb
This commit is contained in:
@@ -103,8 +103,8 @@ async function getImdbId(info, type) {
|
|||||||
|
|
||||||
return cacheWrapImdbId(key,
|
return cacheWrapImdbId(key,
|
||||||
() => new Promise((resolve, reject) => {
|
() => new Promise((resolve, reject) => {
|
||||||
nameToImdb({ name, year, type }, function (err, res) {
|
nameToImdb({ name, year: info.year, type }, function (err, res) {
|
||||||
if (res && !info.date) {
|
if (res) {
|
||||||
resolve(res);
|
resolve(res);
|
||||||
} else {
|
} else {
|
||||||
reject(err || new Error('failed imdbId search'));
|
reject(err || new Error('failed imdbId search'));
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ async function processTorrentRecord(record) {
|
|||||||
console.warn(`Incorrect upload date for [${torrentFound.infoHash}] ${torrentFound.name}`);
|
console.warn(`Incorrect upload date for [${torrentFound.infoHash}] ${torrentFound.name}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await checkAndUpdateTorrent(torrentFound)) {
|
if (await checkAndUpdateTorrent(torrentFound)) {
|
||||||
return torrentFound;
|
return torrentFound;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const { getRandomUserAgent } = require('./../../lib/request_helper');
|
|||||||
const defaultProxies = [
|
const defaultProxies = [
|
||||||
'https://eztv.io'
|
'https://eztv.io'
|
||||||
];
|
];
|
||||||
const defaultTimeout = 20000;
|
const defaultTimeout = 40000;
|
||||||
const minDelay = 3000;
|
const minDelay = 3000;
|
||||||
const jitterDelay = minDelay;
|
const jitterDelay = minDelay;
|
||||||
const limit = 100;
|
const limit = 100;
|
||||||
|
|||||||
Reference in New Issue
Block a user