14

I'm running torrents on the home server, and I talk to home server via the transmission-remote utility. I'd like to retrieve the magnet link for one of my torrents, however this seems to be impossible, as the transmission-remote -t[torrent-id] -i doesn't give me the link, and the manual also says nothing. Is there any way to get a magnet link?

Septagram
  • 5,348
  • 6
  • 20
  • 21

2 Answers2

9

May have been patched since the question was asked, but running

transmission-remote -l -t 13 -i | grep magnet

worked for me, got the magnet link for torrent number 13.

If you want only the link, you can sed away the title:

transmission-remote -l -t 13 -i | grep magnet | sed -e "s/^ *Magnet: //"

You may need to add a parameter --auth <username>:<password> for authentication.

slm
  • 9,959
  • 10
  • 49
  • 57
Puggan Se
  • 340
  • 4
  • 10
7

This worked for me :

transmission-remote -a magnet:?xt=urn...[magnet_link_here]...
Loïc
  • 25
  • 8
vyktorynox
  • 91
  • 1
  • 2
  • To add a bunch of magnets from a.html page `Nokogiri::HTML(File.read("a.html")).css("a").map { |a| a["href"] }.sele ct { |href| href.start_with?("magnet") }.each { |href| system("transmission-remote", "-a", href) }` – Dorian Mar 02 '22 at 07:41