mirror-leech-telegram-bot/sabnzbdapi/bound_methods.py
anasty17 82ba68a414
Add dynamic ffmpeg cmds using list of lists of cmds
- 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>
2024-12-02 05:04:40 +02:00

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)