Opened 8 years ago
Last modified 7 years ago
#5770 new Enhancement
Add Magnetlink to available environment variables
Reported by: | basecase | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | None Set |
Component: | Transmission | Version: | 2.84 |
Severity: | Normal | Keywords: | scripts |
Cc: |
Description
This should be an easy one. Add the magnetlink of a completed torrent to the available variables for post-completion scripts. The option is already there in the context menu. Ideally, I would modify the context menu entry to simple copy a text file into the torrent directory with the magnetlink. Say the magnet link in a flat [NameofTorrent?].magnetlink file. This would allow for better reseeding. In an automated fashion
Attachments (4)
Change History (7)
Changed 8 years ago by basecase
comment:2 Changed 7 years ago by basecase
So I did this the easy way and just made the magnetLINK an environment variable. Patch attached.
## To add the Magnetlink to environment variables
add this line
## tr_strdup_printf ("TR_TORRENT_MAGNETLINK=%s", tr_tr_torrentGetMagnetLink(tor)),
to the torrent.c file in libtransmission line 2117
comment:3 Changed 7 years ago by basecase
Well, if the patch is not accepted then one can get the same functionality from this line:
magnetLINK=$(transmission-remote -t $TR_TORRENT_ID -i | grep "Magnet:" | sed -r 's/^.{10}//')
Modified Transmission.h