"Add peer" as deluge-console command

Suggestions and discussion of future versions
Post Reply
MarkusKramer
Member
Member
Posts: 15
Joined: Sat Oct 18, 2014 1:44 pm

"Add peer" as deluge-console command

Post 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)
Post Reply