torrentool icon indicating copy to clipboard operation
torrentool copied to clipboard

does not work with magnet link?

Open mzramna opened this issue 4 years ago • 6 comments

there is any way to load the torrent status nly by the magnet link?

mzramna avatar Jul 25 '20 16:07 mzramna

Currently no. But I was thinking it over last month. I'll make an experiment and add support if success.

idlesign avatar Jul 26 '20 00:07 idlesign

Any progress here? Been months. I have been using this for some weeks and now am in a position that I need to create torrent file from magnet link. Was looking at something like this: https://stackoverflow.com/questions/8689828/libtorrent-given-a-magnet-link-how-do-you-generate-a-torrent-file, if it's possible for them it's not like it's not possible for this.

modbender avatar Sep 17 '20 19:09 modbender

No progress so far. Thnk you for the link, I'll look into it in a week.

idlesign avatar Sep 18 '20 00:09 idlesign

About the link. libtorrent is a full featured torrent client library.

To implement full .torrent file reconstruction from a magnet link one needs to: implement DHT (BEP5) client, which will find nodes and peers, then connect to a peer and download metadata (BEP9).

The above said seems to be out of scope of a tool working with .torrent files such as torrentool. Adding dependencies also seems undesirable.

I've started implementation of a small DHT client, but it never went further.

idlesign avatar Sep 19 '20 06:09 idlesign

@idlesign How about this?

https://blog.xyzio.com/2019/12/23/convert-magnet-link-to-torrent-file-with-python-and-add-additional-trackers/

modbender avatar Sep 29 '20 14:09 modbender

This link is primarily about uri parsing. Magnet links may include as little as only info hash, so no information about trackers, files etc. may be available. Given that we couldn't reconstruct a full .torrent file from a magnet link without DHT, etc.

The linked code puts magnet-uri entry in a generated torrent file, but it's not an official extension af far as I know. Maybe it is supported solely by rtorrent, maybe not. That should be investigated.

If magnet-uri is supported by major torrent clients, and we're ok with such quazzy torrent files we can try and implements support for that.

idlesign avatar Sep 30 '20 02:09 idlesign