[scraper] fix rutor list seeders

This commit is contained in:
TheBeastLT
2021-02-19 22:43:22 +01:00
parent 3f6515fbfa
commit e7d0c2b620
2 changed files with 4 additions and 4 deletions

View File

@@ -134,9 +134,9 @@ function filesAndSizeFromTorrentStream(torrent, timeout = 30000) {
if (!torrent.infoHash && !torrent.magnetLink) {
return Promise.reject(new Error("no infoHash or magnetLink"));
}
// const magnet = decode.encode({ infoHash: torrent.infoHash, announce: torrent.trackers });
const magnet = torrent.magnetLink || decode.encode({ infoHash: torrent.infoHash, announce: torrent.trackers });
return new Promise((resolve, rejected) => {
const engine = new torrentStream(torrent.infoHash, { connections: MAX_PEER_CONNECTIONS });
const engine = new torrentStream(magnet, { connections: MAX_PEER_CONNECTIONS });
engine.ready(() => {
const files = engine.files