Ability to put magnet link in file for watchdir

Feature requests not specific to either the Mac OS X or GTK+ versions of Transmission
killemov
Posts: 340
Joined: Sat Jul 31, 2010 5:04 pm

Ability to put magnet link in file for watchdir

Postby killemov » Fri May 04, 2012 3:15 pm

Please add the ability to use magnet links with the watchdir. I would like to put the fully qualified magnet link in a .magnet file as text and then have transmission read the file and use the magnet link inside. ( mylink.magnet -> mylink.magnet.added )

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Ability to put magnet link in file for watchdir

Postby rb07 » Sat May 05, 2012 4:25 am


killemov
Posts: 340
Joined: Sat Jul 31, 2010 5:04 pm

Re: Ability to put magnet link in file for watchdir

Postby killemov » Sat May 05, 2012 2:08 pm

Hey rb07, your script:

Code: Select all

#!/bin/bash
#
# Read the last line of file, and try to add it to transmission-daemon
# Assume transmission-remote is in the PATH.

FILE=magnets.txt
TR_OPTIONS="192.168.100.3 -n admn:psswrd --downlimit 500 --uplimit 50"

# Exit if there is no file
[ ! -f "magnets.txt" ] && exit

cat $FILE |
while read m
do
  transmission-remote $TR_OPTIONS --add "$m"
done

# Remove the file
rm $FILE

... should be considered a very good workaround. It still requires users to do something extra to what I would consider base functionality. Not to mention having to open the rpc port when you might not want that.

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Ability to put magnet link in file for watchdir

Postby rb07 » Sat May 05, 2012 3:10 pm

That script can be modified to look for .magnet files, one magnet URL per file. I think that would be an improvement, and easy to do.

About opening the RPC port, the script usually runs on the same machine as the daemon, so you can close the port on the firewall; or the easy way: you can whitelist only localhost (which is the default); you can even enable authentication, transmission-remote has no problem with that, doesn't even have to have the user/password on the script.

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Ability to put magnet link in file for watchdir

Postby rb07 » Tue May 22, 2012 7:14 pm

Related to this is today's change (the code is not yet available) to automatic: DNS forum and Main Page.

This is for RSS feeds, which is not the same, but similar. The author just added:
Feeds with Magnet URIs now work correctly with Automatic

sthuck
Posts: 1
Joined: Mon Oct 13, 2014 7:38 pm

Re: Ability to put magnet link in file for watchdir

Postby sthuck » Mon Oct 13, 2014 8:08 pm

Since the ticket is a 'wontfix', I hope here is a good enough place to post this, in the hopes that other users who were led here by google will find it :D

I did a very small and hack-ish patch (so it may cause other issues!) to add the ability to open magnet links if they are saved in a '.magnet' file, one link per file.
it's here - http://pastebin.com/Pf7GStJn, works with version 2.84 sources. run patch with -p1 .

cfpp2p
Posts: 258
Joined: Sat Aug 08, 2009 3:14 pm

Re: Ability to put magnet link in file for watchdir

Postby cfpp2p » Tue Oct 14, 2014 1:36 pm

sthuck's patch works good. I don't see any problems with it.

Thanks sthuck :D
peace doesn't come without a price...
there is nothing truer on Earth or of the Universe

killemov
Posts: 340
Joined: Sat Jul 31, 2010 5:04 pm

Re: Ability to put magnet link in file for watchdir

Postby killemov » Tue Oct 14, 2014 9:17 pm

sthuck wrote:Since the ticket is a 'wontfix'

There, right there is where the problem with the dev team (or trac moderator) is.

Thanks sthuck!

troubleshooter3d
Posts: 1
Joined: Tue Mar 08, 2016 6:22 am

Re: Ability to put magnet link in file for watchdir

Postby troubleshooter3d » Tue Mar 08, 2016 7:18 am

I have adapted sthuck's patch to work with sources version 2.92. Looks like it behaves just fine. Tested with Cygwin build only, though. :)

Grab the diff there: http://pastebin.com/WSCXdQEx

Note that most of the watchdir logic has been moved from daemon to libtransmission in 2.9x versions.


Return to “Requests”