So, I'm working on porting my flexget plugin to the new client module in 1.2 and am running into a problem. I have the same problem with the
example script, so I'll describe the problem based on that script. If I run the example client with the deluge daemon running, everything works fine and the on_connect_success function gets called. But when I try to run the client script while the daemon is not running, both the on_connect_success and on_connect_fail functions get called. I tried to mitigate this problem by throwing a
at the beginning of the on_connect_success function, but in that case on_connect_fail never gets called. Is this a bug or should I just be handling this differently?
Also, the result that gets passed to my callback for add_torrent_file is always None. Shouldn't I be getting the torrent_id back? If not, how do I get the torrent_id for my newly added torrents?
EDIT: I dug into the source and it seems that all the add_torrent_x functions in core.py are missing the return statement for torrent_id. Working fine in my build after I added that.