Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Jan 26, 2025
1 parent 9169119 commit fac2df8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions bot/helper/ext_utils/status_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<b>CPU:</b> {cpu_percent()}% | <b>FREE:</b> {get_readable_file_size(disk_usage(Config.DOWNLOAD_DIR).free)}"
Expand Down
13 changes: 6 additions & 7 deletions bot/modules/mirror_leech.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
Expand Down

0 comments on commit fac2df8

Please sign in to comment.