Help with Bookmarklet for Add Torrent by URL in 1.7x

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Post Reply
Rochey
Posts: 1
Joined: Sun Jul 05, 2009 9:15 pm

Help with Bookmarklet for Add Torrent by URL in 1.7x

Post by Rochey »

I have been trying to get the 2 Bookmarklets from "Bookmarklet for Add Torrent by URL in 1.5x" to work on the latest 1.72 version. But I have had no luck. They both redirect to my webui but the torrent is never sent and started (and nothing seems to appear in the log).
Now I know that they were in a thread about 1.5x, so they probably don't work for the 1.7x version but has any one got them to work for them?
If not how are other people doing this? (if anyone is).

My ultimate goal is to get the bookmarklet on my IPhone so I can use it there. Any info from anyone would be greatly appreciated.
Regards
Rochey
brownrl
Posts: 4
Joined: Thu Jul 16, 2009 11:43 am

Re: Help with Bookmarklet for Add Torrent by URL in 1.7x

Post by brownrl »

YES YES YES

If anyone knows how to make a bookmarklet to work in 1.7x you would be king! And you have serious mega respect.

The problem is ( I think ) that when you have a bookmarklet it makes a simple call to the "rpc" <img src="the rpc url with add-torrent method" />

In version 1.7x RPC requires some sort X-transmission-session-id to be set in the request headers. To prevent Cross Site scripting.

So I guess now the trick would be is how to set that in the http request to the RPC?

browse to http://yourtransmachine:9091/transmission/rpc

You see you get a 409 message and some info.

Even then I don't think it will go because the request would first have to make a request and get the session-id, then make a second request to get it to work.

Maybe it can bypassed in RPC like turn off session is check.

For now I think the best approach is to make a bookmarklet that calls a php on transmission machine. Then have the php in turn download the link and add it to the transmission queue using the transmissioncli thingy....

or have the php down load the torrent to a watch directory and have it get added that way.

I would prefer to have transmission to by pass the session check. Its not needed for my situation cause everything is an internal house network.
brownrl
Posts: 4
Joined: Thu Jul 16, 2009 11:43 am

Re: Help with Bookmarklet for Add Torrent by URL in 1.7x

Post by brownrl »

http://hlounge.net/iPhoneTransBookmarklet/

Hey peeps,

After searching relentlessly and coming to this thread and few other places I sorta pieced together a few things to get the ball rolling again:

The link above is a small app that I made to create the bookmarklet and PHP script needed to add a torrent using the iPhone.

Previous postings about bookmarklets are not working on the newer transmission versions because the "RPC" now requires some fancy session id stuff to put into the headers.

So I gave up and just made the bookmarklet hit a PHP file which inturns downloads the .torrent and adds it to Transmission.

I will admit that for my situation I made this for an HDX 1000 Network Media Tank. For your situation there maybe some post editing/modding needed.

If you have issues or want to add something to the link please message me.


The Link:
http://hlounge.net/iPhoneTransBookmarklet/
straddle
Posts: 9
Joined: Mon Feb 28, 2011 2:32 pm

Re: Help with Bookmarklet for Add Torrent by URL in 1.7x

Post by straddle »

There is a nice new solution to this which works well using a bookmarklet and a few files on the server:

viewtopic.php?f=8&t=11355&p=52996&hilit ... let#p52996
Post Reply