diff --git a/bot/helper/ext_utils/status_utils.py b/bot/helper/ext_utils/status_utils.py index 47c1f402e..756a954a1 100644 --- a/bot/helper/ext_utils/status_utils.py +++ b/bot/helper/ext_utils/status_utils.py @@ -256,6 +256,8 @@ async def get_readable_message(sid, is_user, page_no=1, status="All", page_step= if status != "All" or tasks_no > 20: for label, status_value in list(STATUSES.items()): if status_value != status: + if not buttons: + buttons = ButtonMaker() buttons.data_button(label, f"status {sid} st {status_value}") button = buttons.build_menu(8) if buttons else None msg += f"CPU: {cpu_percent()}% | FREE: {get_readable_file_size(disk_usage(Config.DOWNLOAD_DIR).free)}" diff --git a/bot/modules/mirror_leech.py b/bot/modules/mirror_leech.py index 957723a84..6b6b4a4fd 100644 --- a/bot/modules/mirror_leech.py +++ b/bot/modules/mirror_leech.py @@ -20,7 +20,7 @@ is_gdrive_id, is_gdrive_link, is_magnet, - # is_mega_link, + is_mega_link, is_rclone_path, is_telegram_link, is_url, @@ -36,10 +36,9 @@ direct_link_generator, ) from bot.helper.mirror_leech_utils.download_utils.gd_download import add_gd_download - -# from bot.helper.mirror_leech_utils.download_utils.mega_download import ( -# add_mega_download, -# ) +from bot.helper.mirror_leech_utils.download_utils.mega_download import ( + add_mega_download, +) from bot.helper.mirror_leech_utils.download_utils.qbit_download import add_qb_torrent from bot.helper.mirror_leech_utils.download_utils.rclone_download import ( add_rclone_download, @@ -387,8 +386,8 @@ async def new_event(self): create_task(add_qb_torrent(self, path, ratio, seed_time)) elif is_rclone_path(self.link): create_task(add_rclone_download(self, f"{path}/")) - # elif is_mega_link(self.link): - # create_task(add_mega_download(self, f"{path}/")) + elif is_mega_link(self.link): + create_task(add_mega_download(self, f"{path}/")) elif is_gdrive_link(self.link) or is_gdrive_id(self.link): create_task(add_gd_download(self, path)) else: diff --git a/update.py b/update.py index 35f5c169a..bee5848e2 100644 --- a/update.py +++ b/update.py @@ -106,10 +106,7 @@ def format(self, record: LogRecord) -> str: except Exception as e: log_error(f"Database ERROR: {e}") -UPSTREAM_REPO = config_file.get( - "UPSTREAM_REPO", - "https://github.com/AeonOrg/Aeon-MLTB", -) or os.getenv("UPSTREAM_REPO", "") +UPSTREAM_REPO = config_file.get("UPSTREAM_REPO", "") or os.getenv("UPSTREAM_REPO", "") or "https://github.com/AeonOrg/Aeon-MLTB" UPSTREAM_BRANCH = ( config_file.get("UPSTREAM_BRANCH", "")