beachandbytes / remote-torrent-adder

Automatically exported from code.google.com/p/remote-torrent-adder
0 stars 0 forks source link

Support for NodeJS-rTorrent #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
a group of us are developing a new webui 
and we would like some information on how we could make it easier for 
remote-torrent-adder to work with it

http://github.com/roastlechon/nodejs-rtorrent

Original issue reported on code.google.com by w...@nwgat.net on 4 Oct 2014 at 6:19

GoogleCodeExporter commented 9 years ago
hey, and thanks for the offering.

RTA only ever adds torrents, so as long as you have a torrent adding function 
in your webui that works with a call over http and has a reasonably easy to 
implement security scheme, i don't see what you could possibly do to make it 
easier for me to implement it, other than throw me the relevant specs, really.

i usually just wireshark stuff together, and rarely are things a nuisance (for 
example rutorrent, because that allows for so many, sometimes sort of asinine, 
configuration scenarios). setting up a node.js environment will probably eat up 
some time, so if you happen to be able to provide an address to a running copy 
of your webui, that'd help i suppose.

Original comment by jul...@gmail.com on 4 Oct 2014 at 1:30

GoogleCodeExporter commented 9 years ago
Hello,
I am the author for nodejs-rtorrent.

In order to add a torrent, the following is needed.

First user must be obtain token by logging in.

JSON posted to URL
http://web_ui_url:port_number/login
{
    email: 'emailaddressofuser',
    password: 'password'
}

Response is JSON
{
    _id: 'id_of_user',
    expires: 'expiresdateunixtime',
    token: 'token
}

JSON posted to URL with appropriate header (derived from response from login)
HEADER:
Authorization: 'Bearer ' + userSession._id + ':' + userSession.expires + ':' + 
userSession.token;
http://web_ui_url:port_number/torrents/load
{
    url: "http://url_of_torrent/magnet"
}

Original comment by amad...@gmail.com on 7 Jan 2015 at 3:48

GoogleCodeExporter commented 9 years ago
hey, thanks for the specs. two questions.

1. is there a function to add a torrent file in the file-upload way? many 
people use RTA with private trackers where just dropping a url into the program 
won't work because of logins/cookies and whatnot.

2. can you give me a sample of both the magnet and torrent file json replies?

i'm not familiar with nodeJS and am flying in the dark here.

Original comment by jul...@gmail.com on 7 Jan 2015 at 11:46

GoogleCodeExporter commented 9 years ago
dude you got (e)mail

Original comment by tomma...@gmail.com on 7 Jan 2015 at 6:49

GoogleCodeExporter commented 9 years ago
i'm not sure that i do?

Original comment by jul...@gmail.com on 12 Jan 2015 at 1:32

GoogleCodeExporter commented 9 years ago
initial support for magnets only (since there's no way of adding binary 
torrents yet) in r936d2635f4ef

Original comment by jul...@gmail.com on 12 Jan 2015 at 3:06

GoogleCodeExporter commented 9 years ago
r8cb0abf8e172 adds file upload capability so it should work like for any other 
client. already merged to default, so will go into the next release.

Original comment by jul...@gmail.com on 14 Jan 2015 at 7:34