Firefox add-on to right click and add torrents from URL

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
godsyn
Posts: 36
Joined: Mon Mar 31, 2008 10:10 pm

Firefox add-on to right click and add torrents from URL

Post by godsyn »

UPDATE: Please use the bookmarklet located HERE instead. I will no longer be developing / supporting this firefox addon.

I am by no means a coder. I consider myself a re-coder. I can take things and bend them to behave the way I would like them to. If you can write this better, by all means.
The original code was taken from http://www.torrentflux.com/forum/index. ... 551.0.html
Much props to the original coder and the coders of clutch for making their code so easy to read and follow.
clutchadd.xpi - 0.01MB
You will need to configure via tools / addons / clutchbt / options; to configure your URL to clutch.
ImageImage
(minor update : removed "go to clutch" option in menu as it was pointless seeing as your bookmarks or the icon will do so just as fast.)
Last edited by godsyn on Fri Feb 06, 2009 7:50 am, edited 4 times in total.
Waldorf
Posts: 1024
Joined: Wed Dec 27, 2006 10:46 am
Location: Belgium

Post by Waldorf »

Did you make this compatible with the 'new' (for the upcoming release of T 1.30)?

Because a lot changed, and you may want to interface directly with T now.
godsyn
Posts: 36
Joined: Mon Mar 31, 2008 10:10 pm

Post by godsyn »

Waldorf wrote:Did you make this compatible with the 'new' (for the upcoming release of T 1.30)?
This is currently using clutch's remote API.
See http://svn.recurser.com/transmission/tr ... /index.php
Waldorf
Posts: 1024
Joined: Wed Dec 27, 2006 10:46 am
Location: Belgium

Post by Waldorf »

theCrank
Posts: 249
Joined: Sat Jun 28, 2008 8:01 am
Location: Karlsruhe, Germany

Post by theCrank »

Are there any other places where i can find some documentation?
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Post by Jordan »

That's a pretty complete spec for the interaction between Transmission and Clutch. What kind of documentation are you looking for?
imtcb
Posts: 8
Joined: Wed Jul 09, 2008 6:24 am

Post by imtcb »

Any chance I could get you to re-write that plugin to download the torrent file to a temp folder then upload it to Clutch? The trackers I use are private and have a passkey system, so url passing doesn't work.

Thanks in advance!
tcb
godsyn
Posts: 36
Joined: Mon Mar 31, 2008 10:10 pm

Post by godsyn »

Imtcb : http://www.alexisbrunet.com/
I'll see if I can manipulate that to fit your needs. No promises.
imtcb
Posts: 8
Joined: Wed Jul 09, 2008 6:24 am

Post by imtcb »

Thanks godsyn!

I'm not sure it is going to be possible though. I had a browse through the index.php and I don't see a torrent file equivelent to the 3rd party url action. I did some testing using the non-3rd party uploadTorrent action in my browser with this url (well, modified with real info) : http://127.0.0.1:9091/clutch/remote/ind ... st.torrent

That didn't do anything noticeable, so either I got the wrong syntax or you can't use that action on it's own like that. I did use my devices (a D-Link DNS323) ip and port, as well as the torrent file's path did not contain any spaces.

Thanks again,
tcb
godsyn
Posts: 36
Joined: Mon Mar 31, 2008 10:10 pm

Post by godsyn »

Looking around I sadly do not see a way to do it short of creating a mini web-server and hosting the file long enough for it to upload..

This is far beyond my ability.
imtcb
Posts: 8
Joined: Wed Jul 09, 2008 6:24 am

Post by imtcb »

SWEET!

That did it! I just need to figure out the js to download to a specific folder and I have it. I will download it to the root of my DNS323 web server and link it from there. I have that already shared to my pc. Saving there, once I know how, will be simple, and it will always be in the same place to pass to Clutch.

If you have a code sample to force a download to a specific location I would greatly appreciate it, otherwise I will start digging around.

Thank you so much for you help on this! Is it ok if I edit your code and repack it with DNS323 in the name if I give you credit?

Oh wait! If there was an option to put the share location of the root of the web server Clutch uses this could work for all users! Just as long as your share had permissions to write in there. Maybe have a folder off the root named torrents or something with write permissions. Is there any way to delete the torrent file after it is loaded I wonder too... Man, this is great.

Thanks again!

tcb
imtcb
Posts: 8
Joined: Wed Jul 09, 2008 6:24 am

Post by imtcb »

I got it working.

It may not look pretty in the code, but it sure does the trick. Here is a link to it if you want to see what I did and make it look better

[edit]
I decided to change a few things:
It wasn't switching to the Clutch tab for me, so I fixed that.
I added a check on the results page, and if it says 'ok' it will reload to the Clutch page.
The statusbar icon wasn't working for me either, so I fixed that as well.
I added in some setTimeouts to give it enough time to download the torrent and refresh the results page. 5s for the torrent, then an additional 2s for the results page (7s total on it). It takes a little longer, but now all private trackers should work.

I'm using FF3, so maybe that was why some of the things weren't working as intended. Overall, I'm very happy with how it works now. Give it a look: http://imtcb.com/clutchadd.xpi.zip

For some reason I can't get it to link properly with the xpi extension, so just remove the .zip and you can use it.

Anyway, thanks again for writing the original one!
tcb
godsyn
Posts: 36
Joined: Mon Mar 31, 2008 10:10 pm

Post by godsyn »

Glad to hear you were able to get it to work for you.

Sadly, this breaks the "normal" method of uploading (right click, send with no local web server).

I wonder why the icon didn't work for you.. I too am using FF3.
imtcb
Posts: 8
Joined: Wed Jul 09, 2008 6:24 am

Post by imtcb »

I have updated it to allow either method.

http://imtcb.com/clutchadd.xpi.zip
WardenDios
Posts: 2
Joined: Sun Jan 11, 2009 6:41 pm

Re: Firefox add-on to right click and add torrents from URL

Post by WardenDios »

Hi!

I have just tried the addon and the following happens:

When I right-click a .torrent URL and selects Pass URL to Clutch I get a 404. The URL looks like this:

Code: Select all

http://PCH-IP:8077/remote/index.php?action=3rdPartyUpload&torrent_url=http://TORRENTURL
Upload to Clutch yields the same result.

However... If i change the file suffix to php5 it works:

Code: Select all

http://PCH-IP:8077/remote/index.php5?action=3rdPartyUpload&torrent_url=http://TORRENTURL
Configration:
* Popcorn Hour A-100 with the latest firmware (00-17-081023-15-POP-402) running Transmission
* Firefox 3.0.5
* ClutchAdd 0.5
* Windows Vista Ultimate

Any ideas?

Thanks in advance

WD
Post Reply