mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] reduces number of calls to 1337x
This commit is contained in:
@@ -151,11 +151,11 @@ async function createTorrentContents(torrent) {
|
||||
}
|
||||
|
||||
async function updateTorrentSeeders(torrent) {
|
||||
if (!torrent.infoHash || !Number.isInteger(torrent.seeders)) {
|
||||
if (!(torrent.infoHash || (torrent.provider && torrent.torrentId)) || !Number.isInteger(torrent.seeders)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return repository.setTorrentSeeders(torrent.infoHash, torrent.seeders)
|
||||
return repository.setTorrentSeeders(torrent, torrent.seeders)
|
||||
.catch(error => {
|
||||
console.warn('Failed updating seeders:', error);
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user