mirror of
https://github.com/anasty17/mirror-leech-telegram-bot.git
synced 2025-01-07 03:26:46 +08:00
82ba68a414
- Change in some sabnzb options to use webui with reverse proxy by disabling some warnings - Remove duplicated jobs instead of pasue - Fix some other minor issues in nzb related to eta - Add user default token option in usettings so use can directly use his rclone.conf/token.pickle without writting mtp: or mrcc: close #1520 Signed-off-by: anasty17 <e.anastayyar@gmail.com>
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
class SubFunctions:
|
|
|
|
async def check_login(self):
|
|
res = await self.get_config("servers")
|
|
if res["config"]:
|
|
self.LOGGED_IN = True
|
|
return res["config"]
|
|
else:
|
|
return False
|
|
|
|
async def add_server(self, server: dict):
|
|
"""server = {
|
|
"name": "main",
|
|
"displayname": "main",
|
|
"host": "",
|
|
"port": 5126,
|
|
"timeout": 60,
|
|
"username": "",
|
|
"password": "",
|
|
"connections": 8,
|
|
"ssl": 1,
|
|
"ssl_verify": 2,
|
|
"ssl_ciphers": "",
|
|
"enable": 1,
|
|
"required": 0,
|
|
"optional": 0,
|
|
"retention": 0,
|
|
"send_group": 0,
|
|
"priority": 0,
|
|
}"""
|
|
return await self.set_special_config("servers", server)
|
|
|
|
async def create_category(self, name: str, dir: str):
|
|
return await self.set_special_config("categories", {"name": name, "dir": dir})
|
|
|
|
async def delete_category(self, name: str):
|
|
return await self.delete_config("categories", name)
|