Get torrent object on adding torrent
See original GitHub issueIs it possible that you can make it so that when torrents_add
is called it returns torrent object? Supposedly I have a torrent magnet url and no other info about it, and the hash is tagged-info-hash which is not info-hash,
Example magnet link:
magnet:?xt=urn:btih:GQMKCY7EZSUS3PDQY7FL23X2AM763ESE&tr=udp://tracker.coppersurfer.tk:6969/announce
I thought assuming and using GQMKCY7EZSUS3PDQY7FL23X2AM763ESE
as info hash was enough, but after I added the magnet url the info hash came out as 3418a163e4cca92dbc70c7cabd6efa033fed9244
and then I learnt that there are 2 types of hashes from here: https://stackoverflow.com/questions/61640538/obtaining-metadata-from-magnetlink-infohash
In this scenario after adding the torrent I don’t know how to get the torrent object, because torrents_add
returns Ok.
and the torrent is then lost (No way to find which is the added torrent)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I went to python discord and asked the question surprisingly I got the right answer: Here is what I’m using to get info hash from magnet url.
nice. i was poking around but the hashing algorithm wasn’t entirely obvious…it does look like magnet links can be quite varied and support all kinds of specifications…as long as they’re just
btih
magnets…i’d expect that to work great.