Skip to content

Commit

Permalink
fix(torrent): fix search by magnet
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Jun 6, 2022
1 parent 11d3b99 commit 4d2561e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 32 deletions.
63 changes: 46 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
"dependencies": {
"@electron/remote": "^2.0.4",
"ansi-256-colors": "^1.1.0",
"bencode": "^2.0.2",
"bitfield": "^4.0.0",
"bencode": "2.0.1",
"bitfield": "3.0.0",
"cheerio": "^1.0.0-rc.10",
"compare-versions": "^4.1.3",
"create-torrent": "3.33.0",
Expand Down
13 changes: 0 additions & 13 deletions src/background/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,19 +370,6 @@ module.exports = async ({
})
}
getTorrentMetadata();

// double check torrent magnet
let secondTry = false;
const doubleCheckTimeout = setTimeout(() => {
secondTry = true;
logT('search', 'second try search by dht')
torrentClient.getMetadata(text, (torrent) => {
logT('search', 'dht search found something')
searchList.push(baseRowData(torrent));
callback(searchList);
})
}, 8000)

}
else
{
Expand Down

0 comments on commit 4d2561e

Please sign in to comment.