Page 1 of 1

"Add peer" as deluge-console command

Posted: Mon Mar 09, 2015 11:07 pm
by MarkusKramer
I want to replicate the "Add peer" function from the GUI as a new deluge-console command.

"Add peer" is currently used only in the GUI call-back "_on_menuitem_add_peer_activate"

I can successfuly call client.core.connect_peer() in a console command without using of Deferred
But I would like to understand why Deferreds are not needed (or I use them unknowingly)
- I use the "add" command and no longer add add_torrent_file() to the Deferred list, but call it "directly".
- Then I found that add_torrent_file() *is* a Deferred.

How to add a new command? (I currently "hijack" add)