Adding Torrents via Firefox and WebUI?

General support for problems installing or using Deluge
Post Reply
ottk3
New User
New User
Posts: 9
Joined: Sun May 04, 2008 5:16 pm

Adding Torrents via Firefox and WebUI?

Post by ottk3 »

Hi there,

is it possible to add Torrent via Firefox and the WebUI automatically?
Because i have a Windows PC (using Firefox) and want to add .torrent files just
by clicking on the link (like save as). Is that possible?

Thanks for your help

ottk3
loki
Moderator
Moderator
Posts: 787
Joined: Tue Dec 04, 2007 3:27 pm
Location: MI, USA

Re: Adding Torrents via Firefox and WebUI?

Post by loki »

I don't know about the web ui part but you should be able to set it to open with deluge instead of save as, point it to "deluge.cmd" in the main install directory.
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Adding Torrents via Firefox and WebUI?

Post by johnnyg »

there used to be a greasemonkey script that did this: http://userscripts.org/scripts/show/12639
but it hasn't been ported to deluge 1.0 yet...
ottk3
New User
New User
Posts: 9
Joined: Sun May 04, 2008 5:16 pm

Re: Adding Torrents via Firefox and WebUI?

Post by ottk3 »

@loki
Deluge is running on a linux computer with the WebUI Plugin, so the Windows PC should be able to send/add his torrents, without pasting them manually in the GUI.

@johnnyg
That's all i found, but it doesn't work with the current version of Deluge nor do i want to install greasemonkey on the Windows PC.

I thought there is maybe a way to send it to "http://host:port/remote/torrent/add" via a small commandline script or something, like it's possible on linux via "curl". Any ideas?
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Adding Torrents via Firefox and WebUI?

Post by johnnyg »

I think the url would look like http://host:port/torrent/add?id_url=torrent_url in its simplest form.
however I would assume you would need to have someway of passing along the login info as well.

as for a batch file to do it: unlike linux, windows cmd isn't that powerful; I'm not sure you could do it without resorting to another scripting language (like python) or writing an actual application which seems like alot more hassle than installing greasemonkey.
ottk3
New User
New User
Posts: 9
Joined: Sun May 04, 2008 5:16 pm

Re: Adding Torrents via Firefox and WebUI?

Post by ottk3 »

i'll test a little bit, cURL ist also available for Windows, but i'm not sure how Firefox transfers URLs if i use "open with"?

then it should be possible to make a batch like this:

Code: Select all

set path=URL
curl.exe -F torrent=@./%path% -F pwd=deluge http://host:port/remote/torrent/add
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: Adding Torrents via Firefox and WebUI?

Post by mvoncken »

johnnyg wrote:there used to be a greasemonkey script that did this: http://userscripts.org/scripts/show/12639
but it hasn't been ported to deluge 1.0 yet...
Just tested it on my machine and the script still works for me with the default settings, to lazy to test anything else right now.
Explain what went wrong.
I'm on vacation , so dont expect any fast reply's or fixes.
dev: webui, core, labels | irc:vonck7 |
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Adding Torrents via Firefox and WebUI?

Post by johnnyg »

ottk3 wrote:i'll test a little bit, cURL ist also available for Windows, but i'm not sure how Firefox transfers URLs if i use "open with"?

then it should be possible to make a batch like this:

Code: Select all

set path=URL
curl.exe -F torrent=@./%path% -F pwd=deluge http://host:port/remote/torrent/add
if your batch file was called webui-downloader.bat say then firefox would run "webui-downloader.bat" "%1" where %1 would be the url of the torrent.
mvoncken wrote:
johnnyg wrote:there used to be a greasemonkey script that did this: http://userscripts.org/scripts/show/12639
but it hasn't been ported to deluge 1.0 yet...
Just tested it on my machine and the script still works for me with the default settings, to lazy to test anything else right now.
Explain what went wrong.
I'm on vacation , so dont expect any fast reply's or fixes.
I hadn't actually tried it, I just assumed that it wouldn't work seeing it was last modified in september '07 :P
ottk3
New User
New User
Posts: 9
Joined: Sun May 04, 2008 5:16 pm

Re: Adding Torrents via Firefox and WebUI?

Post by ottk3 »

I doesn't work with URL, i'm not sure what's wrong, but the script only works with local stored *.torrent files.

I'm not sure what option cURL needs, to use URL Torrents...?

Code: Select all

curl.exe -F torrent=http://domain.tld/foobar.torrent -F pwd=deluge http://host:port/remote/torrent/add
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Re: Adding Torrents via Firefox and WebUI?

Post by mvoncken »

ottk3 wrote:I doesn't work with URL, i'm not sure what's wrong, but the script only works with local stored *.torrent files.

I'm not sure what option cURL needs, to use URL Torrents...?

Code: Select all

curl.exe -F torrent=http://domain.tld/foobar.torrent -F pwd=deluge http://host:port/remote/torrent/add
1 * for firefox use the greasemonkey plugin.
2 * command-line adding from url
2.a get the torrent using wget, and post it using curl.
2.b or link to : /torrent/add?redir_after_login=1&url=URL-ESCAPED-TORRENT-URL
dev: webui, core, labels | irc:vonck7 |
Post Reply