RuudBurger/CouchPotatoServer — pull request #2006 by techmunk (2013-08-11 06:11:10+00:00)
Title: Deluge downloader implementation

Here's a first go at deluge integration. The client appears to work, and can add torrents, as well as get the status.

I'm still struggling with exactly how the torrent statues should be returned, as I had a torrent action of copy, but it still renamed and removed the completed torrent. Any feedback on that?

I first tried to implement this using the deluge.ui.client.py code, but as deluge uses twisted, I couldn't find a way to make the deferred reactor.run() stuff to work, as the reactor cannot be restarted. After that, found a gevent implementation, however that didn't work with the threaded environment of CP. So the included deluge API is modified from the geventdeluge implementation I found, to remove dependence on gevent.