From f0d03591f3ab0a5b074ca3cb47d85431dc7bda07 Mon Sep 17 00:00:00 2001 From: 5hojib Date: Sat, 28 Dec 2024 14:32:01 +0600 Subject: [PATCH] update --- bot/helper/ext_utils/help_messages.py | 2 +- bot/modules/bot_settings.py | 4 ---- bot/modules/file_selector.py | 4 ++-- bot/modules/restart.py | 8 +------- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/bot/helper/ext_utils/help_messages.py b/bot/helper/ext_utils/help_messages.py index b77ee6906..441bbc2ec 100644 --- a/bot/helper/ext_utils/help_messages.py +++ b/bot/helper/ext_utils/help_messages.py @@ -355,7 +355,7 @@ /{BotCommands.DeleteCommand} [drive_url]: Delete file/folder from Google Drive (Only Owner & Sudo). /{BotCommands.UserSetCommand[0]} or /{BotCommands.UserSetCommand[1]} [query]: Users settings. /{BotCommands.BotSetCommand[0]} or /{BotCommands.BotSetCommand[1]} [query]: Bot settings. -/{BotCommands.SelectCommand}: Select files from torrents or nzb by gid or reply. +/{BotCommands.SelectCommand}: Select files from torrents by gid or reply. /{BotCommands.CancelTaskCommand[0]} or /{BotCommands.CancelTaskCommand[1]} [gid]: Cancel task by gid or reply. /{BotCommands.ForceStartCommand[0]} or /{BotCommands.ForceStartCommand[1]} [gid]: Force start task by gid or reply. /{BotCommands.CancelAllCommand} [query]: Cancel all [status] tasks. diff --git a/bot/modules/bot_settings.py b/bot/modules/bot_settings.py index a33bedfde..99c6f96eb 100644 --- a/bot/modules/bot_settings.py +++ b/bot/modules/bot_settings.py @@ -65,10 +65,6 @@ async def get_buttons(key=None, edit_type=None): if key is None: buttons.data_button("Config Variables", "botset var") buttons.data_button("Private Files", "botset private") - buttons.data_button("Qbit Settings", "botset qbit") - buttons.data_button("Aria2c Settings", "botset aria") - buttons.data_button("Sabnzbd Settings", "botset nzb") - buttons.data_button("JDownloader Sync", "botset syncjd") buttons.data_button("Close", "botset close") msg = "Bot Settings:" elif edit_type is not None: diff --git a/bot/modules/file_selector.py b/bot/modules/file_selector.py index b6c4ffc61..78efb5f34 100644 --- a/bot/modules/file_selector.py +++ b/bot/modules/file_selector.py @@ -47,7 +47,7 @@ async def select(_, message): elif len(msg) == 1: msg = ( "Reply to an active /cmd which was used to start the download or add gid along with cmd\n\n" - + "This command mainly for selection incase you decided to select files from already added torrent/nzb. " + + "This command mainly for selection incase you decided to select files from already added torrent. " + "But you can always use /cmd with arg `s` to select files before download start." ) await send_message(message, msg) @@ -92,7 +92,7 @@ async def select(_, message): ) task.listener.select = True except: - await send_message(message, "This is not a bittorrent or sabnzbd task!") + await send_message(message, "This is not a bittorrent task!") return SBUTTONS = bt_selection_buttons(id_) diff --git a/bot/modules/restart.py b/bot/modules/restart.py index 37f95ffdf..0e9990c08 100644 --- a/bot/modules/restart.py +++ b/bot/modules/restart.py @@ -7,7 +7,7 @@ from aiofiles.os import path as aiopath from aiofiles.os import remove -from bot import LOGGER, intervals, sabnzbd_client, scheduler +from bot import LOGGER, intervals, scheduler from bot.core.config_manager import Config from bot.core.mltb_client import TgClient from bot.helper.ext_utils.bot_utils import new_task, sync_to_async @@ -115,12 +115,6 @@ async def confirm_restart(_, query): for intvl in list(st.values()): intvl.cancel() await sync_to_async(clean_all) - if sabnzbd_client.LOGGED_IN: - await gather( - sabnzbd_client.pause_all(), - sabnzbd_client.purge_all(True), - sabnzbd_client.delete_history("all", delete_files=True), - ) proc1 = await create_subprocess_exec( "pkill", "-9",