I just installed deluge and its going great but I was wondering, I do a lot of work on a different pc and leave this one on all the time for various things and i manage it remotely, can you add command line options to pause all the downloads and resume them that way i only have to run deluge --pause-transfers remotely sort of thing?
I know it sounds lazy but it saves me walking up the stairs every time i want to use the net
I think it would definitely be useful if you could run a terminal command to show the statistics of torrents and also manage the torrents (such as pause/resume, update tracker, add, remove and clear finished), because I also frequently use other computers, and if that feature existed, I could easily use ssh to do that.
I am resantly writing such a Plugin that opens a Telnet Server interface, to remotly (mainly used local) connect to deluge.
Here is what i got so far. Its NOT finished but its easy to add new command methods to it.
Add a python method that end with Command to the RequestHandler thats all.
Its looking good if only i knew python it looks easy enough so I'll try and add some more bits to it when i get chance, can you point me in the right direction of how to find out what i need to type for the deluge stuff, i dont know how to word it exactly but you use self.server.core.unique_IDs for the torrent list command, im guessing its the same as java classes but how do i find out what i can use eg self.server.core.stop_all sort of thing.
Hope that makes a bit of sense
EDIT: I just upgraded deluge to 0.5.5 and when i have this plugin on it goes to 100% cpu usage
while not self.stopthread.isSet():
readySocket = select.select([self.socket], [], [self.socket], 0)
if readySocket[0] or readySocket[2] :
if threading.activeCount() < self.threadLimit:
self.handle_request()
time.sleep(0.5)
print 'server stopped'
For the self.server.core you can call every method (def) on the core you like. just take a look into the core.py file to see whats there.
1.) No you can not just user all other classes (files) from deluge by just typing self.server.XYZ only core is there.
2.) depend where you put this method. You have to add it into to the RequestHandler class in telnetserver.py
best is you add it where the helpCommand and all other methods are.
This is very strange, i have tried adding my method into telnetserver.py between prompt and helpCommand, just below helpCommand and in between most of the other methods with no success, the only thing i have changed from what you posted is the server is 127.0.0.1 instead of localhost since localhost gave the error "Server not startet: (99, 'Cannot assign requested address')" ... any ideas?
Also does it take about 20-30 seconds to connect to the telnet server, im guessing its just telnet but im just wondering