[scraper] uses bittorrent-tracker for force update seeders

This commit is contained in:
TheBeastLT
2020-04-25 10:28:22 +02:00
parent dc35b4e982
commit 43c2e737f8
4 changed files with 255 additions and 227 deletions

View File

@@ -33,10 +33,10 @@ async function _updateSeeders(torrent) {
return []
});
// if (!updatedTorrents.find(updated => updated.infoHash === torrent.infoHash)) {
// await forceSeedersLimiter.schedule(() => updateCurrentSeeders(torrent))
// .then(updated => updatedTorrents.push(updated));
// }
if (!updatedTorrents.find(updated => updated.infoHash === torrent.infoHash)) {
await forceSeedersLimiter.schedule(() => updateCurrentSeeders(torrent))
.then(updated => updatedTorrents.push(updated));
}
return Promise.all(updatedTorrents.map(updated => updateLimiter.schedule(() => updateTorrentSeeders(updated))));
}