Spawning additional torrents from a torrent - Beginner quest

Post Reply
tabua
New User
New User
Posts: 3
Joined: Wed Jan 11, 2012 5:51 pm

Spawning additional torrents from a torrent - Beginner quest

Post by tabua »

Hey all, I posted this on utorrent forums. but got no answer so far. I'll quote myself in the hope of getting some help here.

Please do not get into client wars my initial choice was was simply due to popularity. As a torrent user, I've been using deluge since many years and recently installed it on a windows machine too.

Anyway... here it goes.
I don't know if this is the right place to ask this, nor am I sure about the best/easiest way to implement this.

So basically, I would like to experiment with the torrent protocol and test a few concepts I thought about. But have close to zero experience with torrent related development, so bear with me here.

So the main idea would be a torrent being able to spawn other torrents on the client granted they are signed by the creator of the original torrent.
Details about client permission to download and such, are not my main concern at the moment. Those would be addressed at proper time. Right now I have a lot of more basic questions, to which I would kindly ask for some helpful replies.

I think the best way to implement this is by creating a plugin for a client (utorrent for example) that will look inside the torrent contents and proceed accordingly. By 'proceeding accordingly' I mean look inside the torrent, figure out in some way hashes to other torrents so they can be added through a magnet uri, and verify their authenticity in some way.

How would I implement this. Does utorrent supports a plugin API that expose all the necessary functionality? If so, where should I start looking? I would prefer to start by supporting utorrent because of its ubiquity, but not FOSS, there might be some limitations to such hacks, being them technical or legal. In that case I would go for deluge or maybe transmission. Please do not get into irrational client wars here.
thanks in advance
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Spawning additional torrents from a torrent - Beginner q

Post by Cas »

A good starting point is to read the Development documentation on how to write a client or plugin.

I am a bit puzzled by your line about FOSS as Deluge is Free Software but maybe I have misunderstood your meaning.
tabua
New User
New User
Posts: 3
Joined: Wed Jan 11, 2012 5:51 pm

Re: Spawning additional torrents from a torrent - Beginner q

Post by tabua »

Thank you Cas, the quote block is a copy-paste from my post at utorrent forums. The line about non-FOSS software was referring to utorrent.

Deluge appears to be better documented and the plugin system seams to be robust. I don't think I'll bother looking anywhere else in the near future.

So I red the documentation, it's quite comprehensive but I still got confused about a few things things.

I looked into the autoadd plugin, the heavy lifting appears to be done in the core:
https://github.com/gazpachoking/deluge- ... dd/core.py

The plugin author used

Code: Select all

deluge.component.get("TorrentManager").add()
to add a torrent. This confused me, isn't this supposed to be done through the RPC interface?

Another thing that confuses me is the example client. Is it just a stand alone python script that communicates with a running deluge instance? It interacts with the core through deluge.ui.client, is that how plugins interact with the core too? If so, could someone point me to an example?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Spawning additional torrents from a torrent - Beginner q

Post by Cas »

The introduction pages to both the client and plugin does explain some of what you are asking but I will expand the points.
isn't this supposed to be done through the RPC interface?
The RPC interface is only needed when communicating from client to daemon but since the plugin would be installed on the server this is not necessary.

When Autoadd plugin uses deluge.component.get("TorrentManager").add() that is it communicating with the core.

Is it just a stand alone python script that communicates with a running deluge instance?
That is correct. The overview in docs explains that deluge.ui.client module is the API that uses DelugeRPC. Here's an example client script: conkyDeluge
Post Reply