[Plugin] peeradd v0.1
Posted: Tue May 04, 2021 9:53 pm
Recently, peer-addding functionality was requested by a forum member here, so I thought why not practise my noobish deluge-plugin/API, python and javascript abilities, upon this rather basic task, so here's a plugin doing exactly that, for deluge2 and deluge1, and works everywhere i.e. thinclient or classic mode, windows or linux etc, has GTKUI and webUI preferences page and a config-file for also manual additions if wanted e.g. if running without X and/or just use deluge-console, like me(generates peeradd.conf upon first run).
When using the GTKUI or webUI preferences page(or manually editing config-file), then single or multiple peers can be added, in format 'ip:port', comma-seperated if multiple, and doesn't matter if adding space or not after the commas, as I added logic for that also.
It was just a simple basic deluge API call and hooking on TorrentAddedEvent, but took a few days of reading and testing still, because a) i'm an idiot
and b) never e.g. before transfered list to string and vice-versa, using list in dict with deluge config component, remove possible spaces inside list-entries and not to mention needing '*args **kwargs' in one function declaration to even work right in first place etc etc, but anyway, somewhat enhanced my noobish abilities atleast to be slightly litlle less noobish than before lol
I don't believe this will be usefull for 99,9% of people, but as said, was also just as much for the mere exercise simply.
Rename to match python version if needed as usual. You can check debug-logging to see it worked btw. Tested on deluge2 and deluge1, on linux and windows, thinclient and classic mode.
peeradd-0.1-py3.9.egg (deluge2)
peeradd-0.1-py2.7.egg (deluge1)
When using the GTKUI or webUI preferences page(or manually editing config-file), then single or multiple peers can be added, in format 'ip:port', comma-seperated if multiple, and doesn't matter if adding space or not after the commas, as I added logic for that also.
It was just a simple basic deluge API call and hooking on TorrentAddedEvent, but took a few days of reading and testing still, because a) i'm an idiot
![Wink ;)](./images/smilies/icon_e_wink.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
I don't believe this will be usefull for 99,9% of people, but as said, was also just as much for the mere exercise simply.
Rename to match python version if needed as usual. You can check debug-logging to see it worked btw. Tested on deluge2 and deluge1, on linux and windows, thinclient and classic mode.
peeradd-0.1-py3.9.egg (deluge2)
peeradd-0.1-py2.7.egg (deluge1)