GithubHelp home page GithubHelp logo

noam09 / deluge-telegramer Goto Github PK

View Code? Open in Web Editor NEW
145.0 145.0 25.0 2.23 MB

🌊 A Deluge plugin for receiving notifications, adding and viewing torrents using Telegram messenger

License: GNU General Public License v3.0

Python 99.62% JavaScript 0.32% Dockerfile 0.01% Shell 0.01% C 0.03%
deluge deluge-plugin telegram telegram-bot telegramer

deluge-telegramer's People

Contributors

anthonytex avatar dimabroi avatar mattiaforc avatar noam09 avatar tan4ek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deluge-telegramer's Issues

[BUG] Plugin not working

Describe the bug
After installing the plugin ( both stable and alpha release tried), the plugin shows in the deluge interface but does not work at all.

To Reproduce
Steps to reproduce the behavior:

  1. Install the egg plugin via deluge interface.
  2. Restart deluge after install, and fill all settings (API key, user id)
  3. Nothing happens
  4. See errors on logs.

Expected behavior
Receiving a test message after setting the plugin up, also my API key and user id is valid as i tested with another application.

Logs
[ERROR ] 14:27:31 init:57 Appending to sys.path: 'c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg/telegramer/include'
[ERROR ] 14:27:31 request:38 No module named certifi
Traceback (most recent call last):
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\utils\request.py", line 36, in
import certifi
ImportError: No module named certifi

[ERROR ] 14:27:33 init:57 Appending to sys.path: 'c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg/telegramer/include'

(deluge:14984): libglade-WARNING **: unknown attribute `swapped' for .

(deluge:14984): libglade-WARNING **: unknown attribute `swapped' for .

(deluge:14984): libglade-WARNING **: unknown attribute `swapped' for .
[ERROR ] 14:27:33 init:57 Appending to sys.path: 'c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg/telegramer/include'
[ERROR ] 14:27:33 updater:396 error in bootstrap phase; try=0 max_retries=0
Traceback (most recent call last):
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\ext\updater.py", line 386, in _bootstrap
url=webhook_url, certificate=cert, allowed_updates=allowed_updates)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\bot.py", line 57, in decorator
result = func(self, *args, **kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\bot.py", line 1653, in set_webhook
result = self.request.post(url, data, timeout=timeout)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\utils\request.py", line 303, in post
**urlopen_kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\utils\request.py", line 227, in _request_wrapper
raise NetworkError('urllib3 HTTPError {0}'.format(error))
NetworkError: urllib3 HTTPError [Errno 2] No such file or directory
[ERROR ] 14:27:33 updater:151 unhandled exception
Traceback (most recent call last):
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\ext\updater.py", line 148, in _thread_wrapper
target(*args, **kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\ext\updater.py", line 274, in _start_polling
self._bootstrap(bootstrap_retries, clean=clean, webhook_url='', allowed_updates=None)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\ext\updater.py", line 386, in _bootstrap
url=webhook_url, certificate=cert, allowed_updates=allowed_updates)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\bot.py", line 57, in decorator
result = func(self, *args, **kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\bot.py", line 1653, in set_webhook
result = self.request.post(url, data, timeout=timeout)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\utils\request.py", line 303, in post
**urlopen_kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\utils\request.py", line 227, in _request_wrapper
raise NetworkError('urllib3 HTTPError {0}'.format(error))
NetworkError: urllib3 HTTPError [Errno 2] No such file or directory
Exception in thread updater:
Traceback (most recent call last):
File "threading.py", line 801, in __bootstrap_inner
File "threading.py", line 754, in run
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\ext\updater.py", line 148, in _thread_wrapper
target(*args, **kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\ext\updater.py", line 274, in _start_polling
self._bootstrap(bootstrap_retries, clean=clean, webhook_url='', allowed_updates=None)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\ext\updater.py", line 386, in _bootstrap
url=webhook_url, certificate=cert, allowed_updates=allowed_updates)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\bot.py", line 57, in decorator
result = func(self, *args, **kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\bot.py", line 1653, in set_webhook
result = self.request.post(url, data, timeout=timeout)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\utils\request.py", line 303, in post
**urlopen_kwargs)
File "c:\users\user\appdata\roaming\deluge\plugins\telegramer-1.2-py2.7.egg\telegramer\include\telegram\utils\request.py", line 227, in _request_wrapper
raise NetworkError('urllib3 HTTPError {0}'.format(error))
NetworkError: urllib3 HTTPError [Errno 2] No such file or directory

[CRITICAL] 14:27:34 dispatcher:215 stopping due to exception in another thread

OS and Version:

  • OS: Windows 10
  • Deluge version: 1.3.15

Additional context
This is my first issue on github so sorry about any problems.

[BUG] Cannot add plugin to deluge

Describe the bug
I tried to add the plugin via the Web UI, it says install but then nothing happens.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Preferences/Plugins
  2. Click on Install
  3. Choose the egg file
  4. The web UI display the installing dialog, it disappears and nothing happens.

Screenshots
Install dialog
Window after install dialog disappears

OS and Version:

  • OS: Debian 9 in Docker container
  • Deluge version: 1.3.15

Feature Request in list

Hi, love your plug in! It's a great tool.
I hope you will add to show list and filter by label.

10x

[BUG] not sending notifications about added and finished torrents

Describe the bug
If I upload the torrent file with the Telegram bot, I do not get the "Upload finished" and "Torrent finished" messages. Everything works well, except this feature. I've checked the checkboxes at the Notifications.

To Reproduce
Add a torrent using telegramer
Screenshots
image

OS and Version:

  • OS: Raspberry Pi OS
  • Deluge version: 1.3.15
  • Bot version: v1.2.1-alpha

Edit:
It is only happening if I try to upload a torrent file through the telegram bot.

Not working in Windows 10/Web-Ui

Installed the plugin, created the bot, configured proper ids and /started the bot. Not receiving any notifications here, test also seems to fail. Let me know if you need more info.

[BUG] Chat not found error on deluge docker

Describe the bug
Unable to make plugin connect to telegram bot

To Reproduce

  1. Install linuxserver deluge docker
  2. Add .egg to plugins folder
  3. Add telegram user id and token
  4. "/start" telegram bot you have created
  5. Run test in the plugin

Logs
2023-03-29T16:03:46.821620743Z 22:03:46 [DEBUG ][deluge.ui.web.json_api :1622] json-request: b'{"method":"telegramer.telegram_do_test","params":[],"id":26}' 2023-03-29T16:03:46.823050059Z 22:03:46 [DEBUG ][deluge.core.rpcserver :1622] RPC dispatch telegramer.telegram_do_test 2023-03-29T16:03:46.823102376Z 22:03:46 [INFO ][telegramer.core :1622] 2023-03-29 22:03:46 # Telegramer: Send test 2023-03-29T16:03:46.823182163Z 22:03:46 [DEBUG ][telegram.bot :1622] Entering: send_sticker 2023-03-29T16:03:46.824501527Z 22:03:46 [DEBUG ][urllib3.connectionpool :1622] Starting new HTTPS connection (2): api.telegram.org:443 2023-03-29T16:03:46.859571951Z 22:03:46 [DEBUG ][deluge.ui.web.json_api :1622] json-request: b'{"method":"web.update_ui","params":[["queue","name","total_wanted","state","progress","num_seeds","total_seeds","num_peers","total_peers","download_payload_rate","upload_payload_rate","eta","ratio","distributed_copies","is_auto_managed","time_added","tracker_host","download_location","last_seen_complete","total_done","total_uploaded","max_download_speed","max_upload_speed","seeds_peers_ratio","total_remaining","completed_time","time_since_transfer","label"],{}],"id":27}' 2023-03-29T16:03:47.187658429Z 22:03:47 [DEBUG ][urllib3.connectionpool :1622] https://api.telegram.org:443 "POST /bot6250350122:AAGuGonH6QgxG5F-5AmoNYr8U9wgg_ZpTFU/sendSticker HTTP/1.1" 400 73 2023-03-29T16:03:47.198700493Z 22:03:47 [WARNING ][deluge.core.rpcserver :1622] An exception occurred while sending RPC_ERROR to client. Wrapping it and resending. Error to send(causing exception goes next): 2023-03-29T16:03:47.198730775Z Traceback (most recent call last): 2023-03-29T16:03:47.198741055Z File "/usr/lib/python3.11/site-packages/deluge/core/rpcserver.py", line 334, in dispatch 2023-03-29T16:03:47.198749825Z ret = self.factory.methods[method](*args, **kwargs) 2023-03-29T16:03:47.198758078Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.198766840Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/core.py", line 1160, in telegram_do_test 2023-03-29T16:03:47.198775863Z self.bot.sendSticker(self.config['telegram_user'], 2023-03-29T16:03:47.198784107Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 130, in decorator 2023-03-29T16:03:47.198792547Z result = func(*args, **kwargs) 2023-03-29T16:03:47.198808552Z ^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.198833470Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 1044, in send_sticker 2023-03-29T16:03:47.198842328Z return self._message( # type: ignore[return-value] 2023-03-29T16:03:47.198849948Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.198857453Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 336, in _message 2023-03-29T16:03:47.198865369Z result = self._post(endpoint, data, timeout=timeout, api_kwargs=api_kwargs) 2023-03-29T16:03:47.198873263Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.198881040Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 295, in _post 2023-03-29T16:03:47.198888890Z return self.request.post( 2023-03-29T16:03:47.198896414Z ^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.198903975Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 361, in post 2023-03-29T16:03:47.198911935Z result = self._request_wrapper( 2023-03-29T16:03:47.198919486Z ^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.198927142Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 279, in _request_wrapper 2023-03-29T16:03:47.198935152Z raise BadRequest(message) 2023-03-29T16:03:47.198942606Z telegram.error.BadRequest: Chat not found 2023-03-29T16:03:47.198950164Z 2023-03-29T16:03:47.201884331Z 22:03:47 [ERROR ][deluge.core.rpcserver :1622] Exception calling RPC request: Chat not found 2023-03-29T16:03:47.201908492Z Traceback (most recent call last): 2023-03-29T16:03:47.201917969Z File "/usr/lib/python3.11/site-packages/deluge/core/rpcserver.py", line 334, in dispatch 2023-03-29T16:03:47.201925672Z ret = self.factory.methods[method](*args, **kwargs) 2023-03-29T16:03:47.201932748Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.201940251Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/core.py", line 1160, in telegram_do_test 2023-03-29T16:03:47.201952194Z self.bot.sendSticker(self.config['telegram_user'], 2023-03-29T16:03:47.201963057Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 130, in decorator 2023-03-29T16:03:47.201970844Z result = func(*args, **kwargs) 2023-03-29T16:03:47.201978455Z ^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.201990220Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 1044, in send_sticker 2023-03-29T16:03:47.201998356Z return self._message( # type: ignore[return-value] 2023-03-29T16:03:47.202005538Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.202012419Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 336, in _message 2023-03-29T16:03:47.202019745Z result = self._post(endpoint, data, timeout=timeout, api_kwargs=api_kwargs) 2023-03-29T16:03:47.202026831Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.202035503Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 295, in _post 2023-03-29T16:03:47.202046651Z return self.request.post( 2023-03-29T16:03:47.202058996Z ^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.202069494Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 361, in post 2023-03-29T16:03:47.202082153Z result = self._request_wrapper( 2023-03-29T16:03:47.202093634Z ^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.202105304Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 279, in _request_wrapper 2023-03-29T16:03:47.202117973Z raise BadRequest(message) 2023-03-29T16:03:47.202129553Z telegram.error.BadRequest: Chat not found 2023-03-29T16:03:47.202758832Z 22:03:47 [DEBUG ][deluge.core.alertmanager :1622] Alerts queued: 1 2023-03-29T16:03:47.202953116Z 22:03:47 [DEBUG ][deluge.core.alertmanager :1622] session_stats_alert: session stats (291 values): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0, 88, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2193, 0, 2193, 2193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3360, 0, 0, 0, 2520, 0, 0, 0, 90, 0, 120, 0, 27453, 12515, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 2023-03-29T16:03:47.202990626Z 22:03:47 [DEBUG ][deluge.core.alertmanager :1622] Handling alert: session_stats_alert 2023-03-29T16:03:47.203110651Z 22:03:47 [ERROR ][deluge.ui.client :1622] RPCError Message Received! 2023-03-29T16:03:47.203129880Z -------------------------------------------------------------------------------- 2023-03-29T16:03:47.203138734Z RPCRequest: telegramer.telegram_do_test() 2023-03-29T16:03:47.203146211Z -------------------------------------------------------------------------------- 2023-03-29T16:03:47.203153561Z BadRequest 2023-03-29T16:03:47.203160390Z Chat not found: Traceback (most recent call last): 2023-03-29T16:03:47.203167395Z File "/usr/lib/python3.11/site-packages/deluge/core/rpcserver.py", line 334, in dispatch 2023-03-29T16:03:47.203174524Z ret = self.factory.methods[method](*args, **kwargs) 2023-03-29T16:03:47.203181312Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203188257Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/core.py", line 1160, in telegram_do_test 2023-03-29T16:03:47.203195476Z self.bot.sendSticker(self.config['telegram_user'], 2023-03-29T16:03:47.203202376Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 130, in decorator 2023-03-29T16:03:47.203209489Z result = func(*args, **kwargs) 2023-03-29T16:03:47.203216208Z ^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203223039Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 1044, in send_sticker 2023-03-29T16:03:47.203230261Z return self._message( # type: ignore[return-value] 2023-03-29T16:03:47.203244740Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203251895Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 336, in _message 2023-03-29T16:03:47.203259105Z result = self._post(endpoint, data, timeout=timeout, api_kwargs=api_kwargs) 2023-03-29T16:03:47.203266047Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203272923Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 295, in _post 2023-03-29T16:03:47.203280156Z return self.request.post( 2023-03-29T16:03:47.203287046Z ^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203293834Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 361, in post 2023-03-29T16:03:47.203315718Z result = self._request_wrapper( 2023-03-29T16:03:47.203323841Z ^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203330946Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 279, in _request_wrapper 2023-03-29T16:03:47.203338198Z raise BadRequest(message) 2023-03-29T16:03:47.203344833Z telegram.error.BadRequest: Chat not found 2023-03-29T16:03:47.203358127Z 2023-03-29T16:03:47.203364892Z -------------------------------------------------------------------------------- 2023-03-29T16:03:47.203376501Z 22:03:47 [DEBUG ][deluge.core.rpcserver :1622] RPC dispatch core.get_torrents_status 2023-03-29T16:03:47.203384064Z 22:03:47 [ERROR ][deluge.ui.web.json_api :1622] [Failure instance: Traceback (failure with no frames): <class 'deluge.error.WrappedException'>: Chat not found 2023-03-29T16:03:47.203391716Z Traceback (most recent call last): 2023-03-29T16:03:47.203398626Z File "/usr/lib/python3.11/site-packages/deluge/core/rpcserver.py", line 334, in dispatch 2023-03-29T16:03:47.203405633Z ret = self.factory.methods[method](*args, **kwargs) 2023-03-29T16:03:47.203412357Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203419184Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/core.py", line 1160, in telegram_do_test 2023-03-29T16:03:47.203426128Z self.bot.sendSticker(self.config['telegram_user'], 2023-03-29T16:03:47.203432711Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 130, in decorator 2023-03-29T16:03:47.203439632Z result = func(*args, **kwargs) 2023-03-29T16:03:47.203446248Z ^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203452743Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 1044, in send_sticker 2023-03-29T16:03:47.203459701Z return self._message( # type: ignore[return-value] 2023-03-29T16:03:47.203466456Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203473153Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 336, in _message 2023-03-29T16:03:47.203480192Z result = self._post(endpoint, data, timeout=timeout, api_kwargs=api_kwargs) 2023-03-29T16:03:47.203486878Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203493672Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/bot.py", line 295, in _post 2023-03-29T16:03:47.203507150Z return self.request.post( 2023-03-29T16:03:47.203514217Z ^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203520965Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 361, in post 2023-03-29T16:03:47.203536534Z result = self._request_wrapper( 2023-03-29T16:03:47.203544549Z ^^^^^^^^^^^^^^^^^^^^^^ 2023-03-29T16:03:47.203551564Z File "/config/plugins/Telegramer-2.1.1.0-py3.11.egg/telegramer/include/telegram/utils/request.py", line 279, in _request_wrapper 2023-03-29T16:03:47.203559109Z raise BadRequest(message) 2023-03-29T16:03:47.203565814Z telegram.error.BadRequest: Chat not found

OS and Version:

Additional context
It seems that plugin unable to find the bot chat that I created, but I definitely input the name of the bot right and started it before 'Test' run. Also bot token added to plugin.

Thought that maybe plugin unable to reach internet while it`s in docker container? But don't know if it is the reason or not.

Can't connect to Daemon after adding new torrent

After adding a new torrent (magnet) via Telegramer, deluge-web can't connect to Daemon anymore. Connection manager showing Offline Daemon, can not start, connection lost. Torrents are still downloading, /list command worked.
System: Pi 3 running newest Jessie, Deluged ver 1.3.13, max connection: 200.

Can't save Category Settings

Describe the bug
Unable to save Category settings via the Web UI

To Reproduce
Steps to reproduce the behavior:

  1. Go to Preferences
  2. Click on Telegramer
  3. Scroll down to Categories
  4. Add Categories
  5. Click Apple and OK
  6. Reload or Restart Deluge
  7. Changes are not saved

Expected behavior
Categories should be saved

Logs

13:13:12 [ERROR   ][deluge.core.rpcserver              :1622] Exception calling RPC request: 'cat1'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/deluge/core/rpcserver.py", line 334, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/plugins/Telegramer.egg/telegramer/core.py", line 1111, in set_config
    self.config[key] != config[key]:
    ~~~~~~~~~~~^^^^^
  File "/usr/lib/python3.11/site-packages/deluge/config.py", line 235, in __getitem__
    return self.get_item(key)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/deluge/config.py", line 255, in get_item
    return self.__config[key]
           ~~~~~~~~~~~~~^^^^^
KeyError: 'cat1'
13:13:12 [ERROR   ][deluge.ui.client           :1622] RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: telegramer.set_config({'cat1': 'test', 'dir1': '/test'})
--------------------------------------------------------------------------------
KeyError
'cat1': Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/deluge/core/rpcserver.py", line 334, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/plugins/Telegramer.egg/telegramer/core.py", line 1111, in set_config
    self.config[key] != config[key]:
    ~~~~~~~~~~~^^^^^
  File "/usr/lib/python3.11/site-packages/deluge/config.py", line 235, in __getitem__
    return self.get_item(key)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/deluge/config.py", line 255, in get_item
    return self.__config[key]
           ~~~~~~~~~~~~~^^^^^
KeyError: 'cat1'

--------------------------------------------------------------------------------
13:13:12 [ERROR   ][deluge.ui.web.json_api     :1622] [Failure instance: Traceback (failure with no frames): <class 'deluge.error.WrappedException'>: 'cat1'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/deluge/core/rpcserver.py", line 334, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/plugins/Telegramer.egg/telegramer/core.py", line 1111, in set_config
    self.config[key] != config[key]:
    ~~~~~~~~~~~^^^^^
  File "/usr/lib/python3.11/site-packages/deluge/config.py", line 235, in __getitem__
    return self.get_item(key)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/deluge/config.py", line 255, in get_item
    return self.__config[key]
           ~~~~~~~~~~~~~^^^^^
KeyError: 'cat1'

OS and Version:

  • OS: Centos 7
  • Deluge version: Deluge 2.1.1

Additional context
Installed via Docker. I've tried manually adding the json value from the logs into the "categories" key inside the Telegram.conf file but it still doesn't work after restart.

[BUG] telegramer.conf missing

Describe the bug
Unable to open config file /volume1/@appstore/deluge/var/telegramer.conf: [Errno 2] No such file or directory: '/volume1/@appstore/deluge/var/telegramer.conf'

To Reproduce
Steps to reproduce the behavior:

  1. Go to install egg
  2. Click on Telegramer
  3. Scroll down to not see in the left side
  4. See error

Screenshots
image

Logs
15:40:49 [ERROR ][deluge :58 ] Appending to sys.path: '/volume1/@appstore/deluge/var/plugins/Telegramer-1.3.1-py2.7.egg/telegramer/include'
15:40:50 [INFO ][deluge.plugin.telegramer.core :226 ] 2022-06-16 15:40:50 # Telegramer: Enable
15:40:50 [WARNING ][deluge.config :410 ] Unable to open config file /volume1/@appstore/deluge/var/telegramer.conf: [Errno 2] No such file or directory: '/volume1/@appstore/deluge/var/telegramer.conf'
15:40:50 [INFO ][deluge.pluginmanagerbase :189 ] Plugin Telegramer enabled...

OS and Version:

  • OS: Linux
  • Deluge version: 2.0.3-13

Win 7 x64 Py 2.7 /add crash

Deluge crash if plugin "label" are disabled.
At Telegram we are see dialog:
/add
Select Directory
"ISO"
At this point, the application crash. if the plugin 'label' disabled
Select Label
"No Label"
...

[Feature Request] Send commands from telegram group

Is your feature request related to a problem? Please describe.
I dont know if it is a problem or a settings issue, or if it's by design. I have a bot set in a family group and I want to be able to send /down within the group and the bot respond.

Describe the solution you'd like
To be able to send commands to the bot from within a group or maybe just the /down command to anyone not set in the users.

Describe alternatives you've considered
Dont have one.

Additional context
None.

[BUG] up down commands not working

09:22:51 [WARNING ][deluge.plugin.telegramer.core :362 ] Update "{'message': {'new_chat_photo': [], 'photo': [], 'entities': [{'type': 'bot_command', 'length': 3, 'offset': 0}], 'text': '/up', 'message_id': 96, 'group_chat_created': False, 'supergroup_chat_created': False, 'caption_entities': [], 'new_chat_members': [], 'delete_chat_photo': False, 'date': 1651828971, 'channel_chat_created': False, 'chat': {'first_name': '', 'type': 'private', 'last_name': '', 'username': '', 'id': }, 'from': {'last_name': '', 'first_name': '', 'language_code': 'en', 'username': '', 'id': red, 'is_bot': False}}, 'update_id': 782976158}" caused error "'bool' object is not iterable"

up ,down and list commands are giving errors

[BUG] Telegramer does not start after updating deluge

Describe the bug
Telegramer does not start after updating deluge

Screenshots
No work

Logs
09:14:18 [ERROR ][deluge.pluginmanagerbase :1672] Unable to instantiate plugin 'Telegramer' from '/config/plugins/Telegramer-2.1.1.2-py3.11.egg'!
09:14:18 [ERROR ][deluge.pluginmanagerbase :1672] The 'Telegramer' distribution was not found and is required by the application
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
instance = cls(plugin_name.replace('-', '_'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/plugins/Telegramer-2.1.1.2-py3.11.egg/telegramer/init.py", line 64, in init
load_libs()
File "/config/plugins/Telegramer-2.1.1.2-py3.11.egg/telegramer/init.py", line 53, in load_libs
egg = pkg_resources.require("Telegramer")[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pkg_resources/init.py", line 937, in require
needed = self.resolve(parse_requirements(requirements))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pkg_resources/init.py", line 798, in resolve
dist = self._resolve_dist(
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pkg_resources/init.py", line 839, in _resolve_dist
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Telegramer' distribution was not found and is required by the application

OS and Version:
OS: Linux
Deluge version: [e.g. 2.1.1]
deluge --version or deluged --version

[BUG] Can't get the plugin to work on Deluge 2.1.1

Describe the bug
I can't seem to get the plugin to work. I get the errors on the log below.

To Reproduce
I put the .egg on my plugins folder and start deluge.

Logs
Telegramer: Import error - No module named 'certifi'
Traceback (most recent call last):
File "/config/plugins/Telegramer-2.1.1.0-py3.10.egg/telegramer/core.py", line 71, in
from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove, Bot, Update)
File "/config/plugins/Telegramer-2.1.1.0-py3.10.egg/telegramer/include/telegram/init.py", line 175, in
from .bot import Bot
File "/config/plugins/Telegramer-2.1.1.0-py3.10.egg/telegramer/include/telegram/bot.py", line 103, in
from telegram.utils.request import Request
File "/config/plugins/Telegramer-2.1.1.0-py3.10.egg/telegramer/include/telegram/utils/request.py", line 33, in
import certifi
ModuleNotFoundError: No module named 'certifi'

17:54:15 [ERROR ][deluge.pluginmanagerbase :153 ] Unable to instantiate plugin 'Telegramer' from '/config/plugins/Telegramer-2.1.1.0-py3.10.egg'!
17:54:15 [ERROR ][deluge.pluginmanagerbase :1512] name 'CorePluginBase' is not defined
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
instance = cls(plugin_name.replace('-', '_'))
File "/config/plugins/Telegramer-2.1.1.0-py3.10.egg/telegramer/init.py", line 65, in init
from .core import Core as _plugin_cls
File "/config/plugins/Telegramer-2.1.1.0-py3.10.egg/telegramer/core.py", line 214, in
class Core(CorePluginBase):

OS and Version:

  • OS: Linux
  • Deluge version: 2.1.1
    deluge --version or deluged --version

Thanks

[BUG] cant activate plugin on deluged 2.0.5

Describe the bug
After install plugin egg it cant be activated in plugins menu

Message in log

22:08:49 [ERROR   ][deluge                        :59  ] NOTANERROR: Appending to sys.path: '/home/htpc/.config/deluge/plugins/Telegramer-1.2.1.7-py3.8.egg/telegramer/include'
22:08:49 [ERROR   ][deluge                        :87  ] 2022-04-05 22:08:49 # Telegramer: Import error - No module named 'urlparse'
Traceback (most recent call last):
  File "/home/htpc/.config/deluge/plugins/Telegramer-2.0.5.0-py3.10.egg/telegramer/core.py", line 68, in <module>
    from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove, Bot, Update)
  File "<frozen zipimport>", line 259, in load_module
  File "/home/htpc/.config/deluge/plugins/Telegramer-1.2.1.7-py3.8.egg/telegramer/include/telegram/__init__.py", line 46, in <module>
    from .files.file import File
  File "<frozen zipimport>", line 259, in load_module
  File "/home/htpc/.config/deluge/plugins/Telegramer-1.2.1.7-py3.8.egg/telegramer/include/telegram/files/file.py", line 24, in <module>
    from urlparse import urlparse as urllib_parse
ModuleNotFoundError: No module named 'urlparse'

22:08:49 [ERROR   ][deluge.pluginmanagerbase      :155 ] Unable to instantiate plugin 'Telegramer' from '/home/htpc/.config/deluge/plugins/Telegramer-2.0.5.0-py3.10.egg'!
22:08:49 [ERROR   ][deluge.pluginmanagerbase      :1481] name 'CorePluginBase' is not defined
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/pluginmanagerbase.py", line 150, in enable_plugin
    instance = cls(plugin_name.replace('-', '_'))
  File "/home/htpc/.config/deluge/plugins/Telegramer-2.0.5.0-py3.10.egg/telegramer/__init__.py", line 65, in __init__
    from .core import Core as _plugin_cls
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/home/htpc/.config/deluge/plugins/Telegramer-2.0.5.0-py3.10.egg/telegramer/core.py", line 211, in <module>
    class Core(CorePluginBase):
NameError: name 'CorePluginBase' is not defined

deluged 2.0.5
libtorrent: 1.1.13.0
Python: 3.8.10
OS: Linux Ubuntu 20.04 focal

[Feature Request] Exclude Label Notification

Description

In case of user already have some third party apps that also send Telegram messages (e.g. Radarr, Sonarr, SickRage, flexget). Add ability to disable selected labels.

Expected Behavior

Exclude Notification Label: TV, Movie ...
(Optional) Exclude Notification Path: /Downloads/TV, /Downloads/Movie

Not working /list, /up & /down> commands

Hi!
Nothing happens when I send one of this commands (/list, /up or /down) via telegram.
I use Debian Jessie, Python 2.7.9, Telegramer-1.1.7.2, deluged 1.3.15 and libtorrent 1.0.11.0

Here some extra info:

root@files:~# tail -n 50 /var/log/deluge/daemon/warning.log
[INFO    ] 17:39:36 daemon:127 Deluge daemon 1.3.15
[INFO    ] 17:39:37 core:87 Starting libtorrent 1.0.11.0 session..
[INFO    ] 17:39:38 rpcserver:369 Starting DelugeRPC server localhost:58846
[INFO    ] 17:39:38 pluginmanagerbase:158 Plugin Scheduler enabled..
[INFO    ] 17:39:38 pluginmanagerbase:158 Plugin AutoRemovePlus enabled..
[INFO    ] 17:39:38 core:97 *** Start Label plugin ***
[INFO    ] 17:39:38 pluginmanagerbase:158 Plugin Label enabled..
[ERROR   ] 17:39:39 __init__:56 Appending to sys.path: '/home/z/.config/deluge/plugins/Telegramer-1.1.7.2-py2.7.egg/telegramer/include'
[INFO    ] 17:39:39 core:171 2018-02-13 17:39:39 # Telegramer: Enable
[INFO    ] 17:39:39 pluginmanagerbase:158 Plugin Telegramer enabled..
[INFO    ] 17:39:39 torrentmanager:651 Successfully loaded state file: /home/z/.config/deluge/state/torrents.state
[INFO    ] 17:39:40 torrentmanager:780 Successfully loaded fastresume file: /home/z/.config/deluge/state/torrents.fastresume
[WARNING ] 17:39:43 core:131 check interval loop starting
[ERROR   ] 17:40:18 dispatcher:293 An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.2-py2.7.egg/telegramer/include/telegram/ext/dispatcher.py", line 271, in process_update
    handler.handle_update(update, self)
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.2-py2.7.egg/telegramer/include/telegram/ext/commandhandler.py", line 180, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.2-py2.7.egg/telegramer/core.py", line 366, in cmd_list
    self.telegram_send(self.list_torrents(), to=[update.message.chat.id], parse_mode='Markdown')
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.2-py2.7.egg/telegramer/core.py", line 691, in list_torrents
    if filter(t)] or [STRINGS['no_items']])
  File "/home/z/.config/deluge/plugins/Telegramer-1.1.7.2-py2.7.egg/telegramer/core.py", line 158, in format_torrent_info
    return ''.join([f(status[i], status) for i, f in INFO_DICT if f is not None])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 5: ordinal not in range(128)


root@files:~# python -V
Python 2.7.9

root@files:~# /usr/bin/deluged -v
deluged: 1.3.15
libtorrent: 1.0.11.0

root@files:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.10 (jessie)
Release:        8.10
Codename:       jessie

root@files:~# uname -r
3.16.0-4-amd64

Notifications - What Variables are Supported?

Before Deluge, I was using QbitTorrent.
It didn't have the ability to send Telegram notifications, so I created a custom script and these variables were available when Executing custom scripts: Torrent Name, Category, Size, Saving Path, and its Hash.

Deluge Seems much better. Thanks to your plugin, there is no need for such a custom script. Also, it allows custom modifications to the message.

In your plugin settings page, in the notifications section, the default message when adding torrent is:
Added Torrent *TORRENTNAME*

This is great to allow custom modifications for the message. The question is what Variables are available besides TORRENTNAME?

OS and Version:

  • OS: Linux (Docker linuxserver/deluge)
  • Deluge version: 2.1.1

[Feature Request] adding torrent without commands

Describe the solution you'd like
Throw a new .torrent file to telegramer, and telegramer adds the torrent to deluge without asking further questions. (with no label, using default settings)

Additional context

[As of now]

  1. Download a .torrent file with Safari(iOS).
  2. Switch to telegram app, find Telegramer bot, and enter commands.
  3. Switch back to Safari, and share(send) .torrent file to Telegramer.
  4. Telegramer adds the torrent to Deluge.

[I'd like]

  1. Download a .torrent file with Safari, and share(send) it to Telegramer.
  2. Telegramer adds the torrent to Deluge.

Great plugin, Thank you noam!

Feature Request

Hey noam,
I love this plugin. It works really well and is very stable.
Would it be possible to add a feature enabling notifications for users other than just the bot owner? Maybe giving the additional ID's this feature would be easy?
Many thanks.

[BUG] Telegramer does not start after updating deluge

Describe the bug
File "/usr/lib/python3.11/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
The python version has changed.

To Reproduce
No errors

Screenshots
image

Logs
[custom-init] No custom files found, skipping...
22:16:57 [ERROR ][deluge.pluginmanagerbase :1622] Unable to instantiate plugin 'Telegramer' from '/config/plugins/Telegramer-2.0.5.0-py3.10.egg'!
22:16:57 [ERROR ][deluge.pluginmanagerbase :1622] The 'Telegramer' distribution was not found and is required by the application
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin
instance = cls(plugin_name.replace('-', '_'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/plugins/Telegramer-2.0.5.0-py3.10.egg/telegramer/init.py", line 64, in init
load_libs()
File "/config/plugins/Telegramer-2.0.5.0-py3.10.egg/telegramer/init.py", line 53, in load_libs
egg = pkg_resources.require("Telegramer")[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/init.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkg_resources/init.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Telegramer' distribution was not found and is required by the application

OS and Version:

  • OS: Linux
  • Deluge version: [e.g. 2.1.1]
    deluge --version or deluged --version

[BUG] cancel command not always working

running deluge 2.0.5 on a docker with the python 3.10 egg version of the plugin.
the command /cancel is not working for /add or /addpaused

Steps to reproduce the behavior:

  1. type /add or /addpaused
  2. wizard starts
  3. type /cancel
  4. wizard continues...
  5. after typing /cancel 4-5 times you get the "operation cancelled"

Expected behavior
"operation cancelled" after the first /cancel command

Screenshots
adding screenshots:
add
addpaused

[Feature Request] Custom Notification Message

Description

Ability to personalize the notification text (with HTML or Markdown).

Expected Behavior

[HTML] Custom Message:

<b>Foobar</b>
Downloaded: <b>{TorrentName}</b>

[Markdown] Custom Message:

**Foobar**
Downloaded: `{TorrentName}`

[Feature Request] Resume/Pause options

Command lines for Resume/Pause should be added. It's almost a necessity. A particular torrent can be Resumed/Paused by replying to the Torrent added message or something like that. The same could be done with all active/inactive torrents. I kindy implore you add this feature.

[BUG] Categories/Directories aren't working

Categories and Directories aren't getting saved in preferences.
I'm specifying Categories and directories and they are not getting saved properly. When I restart the deluged server I see the fields empty. Apart from that when using the telegram bot when using /add command when I specify the category it doesn't download torrent in the specified directory instead it downloads it in the default directory.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'prefrences'
  2. Click on 'Telegramer tab'
  3. Fill 'Categories and directories section'
  4. Click on 'Apply' and 'Ok'

Expected behavior
The config should be saved and on adding torrent through telegram bot after specifying category it should download torrent in the corresponding directory.

Logs
[DEBUG ] 21:13:18 connectionpool:835 Starting new HTTPS connection (10): api.telegram.org
[DEBUG ] 21:13:19 core:1138 2022-05-29 21:13:19 # Telegramer: Get config
[DEBUG ] 21:13:21 core:1113 2022-05-29 21:13:21 # Telegramer: Set config
[ERROR ] 21:13:21 rpcserver:306 Exception calling RPC request: 'cat1'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/deluge/core/rpcserver.py", line 301, in dispatch
ret = self.factory.methods[method](*args, **kwargs)
File "/home/deluge/.config/deluge/plugins/Telegramer-1.3.1-py2.7.egg/telegramer/core.py", line 1117, in set_config
self.config[key] != config[key]:
File "/usr/lib/python2.7/dist-packages/deluge/config.py", line 245, in getitem
return self.get_item(key)
File "/usr/lib/python2.7/dist-packages/deluge/config.py", line 263, in get_item
if isinstance(self.__config[key], str):
KeyError: 'cat1'
[DEBUG ] 21:13:23 updater:326 Timed out getting Updates: Timed out
[DEBUG ] 21:13:23 bot:74 Entering: get_updates
[DEBUG ] 21:13:23 connectionpool:835 Starting new HTTPS connection (11): api.telegram.org

OS and Version:

  • OS: Ubuntu 18.04
  • Deluge version: 1.3.15
  • Telegrammer version: 1.3.1

[Feature Request] Deluge 2.0 support

Deluge 2.0 released.

Plugins written for Deluge 1.3 will need upgrading for Deluge 2.0, due to the requirement of Python 3 and GTK3 UI. There is a update plugin document to help Plugin authors update their plugins.

following install tutorial in README does not work

Hi noam09!
Love your app, thank you so much for this super plugin!
I had one problem after following your install tutorial : The Telegram plugin did not start, i could see that, because in the left side panel, Telegramer did not show up. Eventually pinned the problem to TelegramBotAPI. The problem was, it was installed with pip using my main account, but deluge runs on user deluge. So the plugin would not find the needed API.

Anyway, go to the folder where Telegramer was downloaded to, install dependencies and compile eggshell
After that, run
sudo pip install -e .

Working flawlessly after that!

Bot working but not replying

Hello,

After running for a little while, the bot still works sending me notifications of torrents added, downloaded etc but I can no longer interact adding or listing torrents.

I have tried reloading.

pkg_resources.DistributionNotFound: The 'Telegramer' distribution was not found and is required by the application

Hello. I've installed latest beta

This is what I get after trying to tick the plugin. The plugin checkbox remains empty and the plugin is inactive.

19:12:03 [ERROR   ][deluge.pluginmanagerbase          :72  ] Unable to instantiate plugin 'Telegramer' from 'c:\\users\\dk\\appdata\\roaming\\deluge\\plugins\\telegramer-2.0.5.0-py3.8.egg'!
19:12:03 [ERROR   ][deluge.pluginmanagerbase          :72  ] The 'Telegramer' distribution was not found and is required by the application
Traceback (most recent call last):
  File "deluge\pluginmanagerbase.py", line 148, in enable_plugin
  File "c:\users\dk\appdata\roaming\deluge\plugins\telegramer-2.0.5.0-py3.8.egg\telegramer\__init__.py", line 64, in __init__
    load_libs()
  File "c:\users\dk\appdata\roaming\deluge\plugins\telegramer-2.0.5.0-py3.8.egg\telegramer\__init__.py", line 53, in load_libs
    egg = pkg_resources.require("Telegramer")[0]
  File "pkg_resources\__init__.py", line 886, in require
  File "pkg_resources\__init__.py", line 772, in resolve
pkg_resources.DistributionNotFound: The 'Telegramer' distribution was not found and is required by the application

Here's my about page^
deluge about

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.