Page 1 of 1

Get magnet link back from Deluge

Posted: Sun Aug 29, 2021 10:56 am
by delugeuser23
Hi!

There's a torrent I've been seeding for ages and I want to send a link to it to an acquaintance but I can't find the original magnet link on the web anymore.
It should be trivial for Deluge to generate a magnet link from any torrent it is seeding, but I can't find any option to do that. How do I go about generating a magnet link to send to somebody?

Thanks!

Re: Get magnet link back from Deluge

Posted: Sun Aug 29, 2021 12:21 pm
by mhertz
I believe deluge doesn't have such feature, but e.g could be scripted from a shell-function/script using deluge-console, but for making such manually, then you find and copy the infohash of the magnet(which by itself can be shared and used in deluge, qbittorrent and transmission etc) and prepend the base-part of the magnet Uri scheme onto it, I.e:

Code: Select all

magnet:?xt=urn:btih:<infohash>
So for example an infohash of '53a9a99871a7beab25fc1b9d83713d696613aa65' then becomes:

Code: Select all

magnet:?xt=urn:btih:53a9a99871a7beab25fc1b9d83713d696613aa65
Infohash can be found/copied from torrent 'details' tab of UIs, under 'Hash' heading, atleast on deluge2.

There maybe is a plugin for this which I haven't looked for - there was an old one though stopped working, but fix posted by fellow forum member but only worked for some reportedly.

Btw, here's a couple simple examples of getting a magnet link generated into clipboard or txt file through deluge-console I posted some years ago, though deluge1 at the time, but probably only change needed being to additionally add asterisk(s) of search pattern manually yourself for deluge2 usage: viewtopic.php?t=54997

Re: Get magnet link back from Deluge

Posted: Mon Aug 30, 2021 9:04 pm
by delugeuser23
Thanks for the pointers!

Re: Get magnet link back from Deluge

Posted: Wed Sep 01, 2021 6:54 pm
by kurupt13
It should be trivial for Deluge to generate a magnet link from any torrent it is seeding, but I can't find any option to do that. How do I go about generating a magnet link to send to somebody?
Also make sure to give them a more comprehensive magnet link such as tagging on atleast one or two trackers the torrent uses so they can pickup the torrent much more quickly if not sharing a torrent file with all the data in it by adding the &TR tag at the end of the hash.

This will allow whoever you're sharing with to not waste time discovering the torrent from scratch.

Re: Get magnet link back from Deluge

Posted: Wed Sep 01, 2021 7:22 pm
by mhertz
Also make sure to give them a more comprehensive magnet link such as tagging on atleast one or two trackers the torrent uses so they can pickup the torrent much more quickly if not sharing a torrent file with all the data in it by adding the &TR tag at the end of the hash.

This will allow whoever you're sharing with to not waste time discovering the torrent from scratch.
You're right, though atleast if the recipient is using a fellow libtorrent-rasterbar based client, then very fast at resolving even without optional fallback trackers appended to magnet URI - for popular content in this scenario, even without dht bootstrapped, takes a couple secs, though other engines usually 40 secs roughly. Arvid did great job profiling this aspect specifically, to optimize for bottlenecks/bugs.

Re: Get magnet link back from Deluge

Posted: Wed Sep 28, 2022 8:55 am
by vensoner
Thanks. It is very informative and usefullol beans