Include cookies for add by url in web interface

Feature requests not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Gobbluth529
Posts: 3
Joined: Tue Aug 24, 2010 12:38 am

Include cookies for add by url in web interface

Post by Gobbluth529 »

I would like the web interface add by url link to be able to use cookie to download .torrent files from private servers. The cookies file could be a text file that the admin sets up ahead of time. It could act the same way that wget uses the --load-cookies option. This would be extremely useful for adding .torrent files from private servers using an iPad or iPhone.
As a workaround I set up an Apache/PHP5 web server on the machine transmission is running on. I then wrote a script to download the .torrent file using wget follwed by adding the torrent file to transmission using the transmission-remote command.
To do this the PHP gets the link ($link) from the private server passes it to wget and executes: wget --load-cookies cookies.txt --ignore-length --output-document=/var/www/tmp/$torrname $link
The cookies.txt file contains the encrypted username and password for the private server. You can even have more than one server in there.
Then submit the torrent via transmission-remote: transmission-remote localhost:9091 -n 'username:password' -a /var/www/tmp/$torrname
I have transmission running on an Ubuntu 10.04 machine
anville
Posts: 16
Joined: Thu Apr 16, 2009 2:41 am

Re: Include cookies for add by url in web interface

Post by anville »

I posted a patch for for this on trac with Ticket #3077. I hope this (or a version of it) can get into the main build.

https://trac.transmissionbt.com/ticket/3077

When you fetch an URL remotely, it will look for a "cookie.txt" file in the app's config dir. It's been working great for me when I give an URL from my iPhone or use the Firefox extension "AutoTrans" .

Any other support for the devs to add this to the build? :-)
Gobbluth529
Posts: 3
Joined: Tue Aug 24, 2010 12:38 am

Re: Include cookies for add by url in web interface

Post by Gobbluth529 »

Holy Cow that is fantastic. It works great. Thanks so much. I hope they include that as well. :D
Post Reply