

This. Exactly 20 bytes long SHA1 hash of the info part of torrent file. UPDATE: I am using this class to download Torrent file from magnet const Discovery = require('torrent-discovery') Ĭonst Protocol = require('bittorrent-protocol') Ĭonst ut_metadata = require('ut_metadata') Ĭonst addrToIPPort = require('addr-to-ip-port') I'll Post The Code Snippet here afterward. In case you are wondering, the below magnet link also contains basic trackers too. Just replace INFOHASH in the below link with your info hash of the torrent and TORRENTNAME with the actual torrent name. To create a magnet link with the info hash, you can use the below format. Well, The code is not yet fully production ready. Create Magnet Link with Torrent Info Hash. once the client gets metadata, I just saved it to the torrent file and canceled the download. I used webtorrent npm package and also created an algorithm to loop through the whole database and added the magnet link in the download task.
