diff --git a/bot/helper/ext_utils/bot_utils.py b/bot/helper/ext_utils/bot_utils.py
index 6f3fd57..20b316c 100644
--- a/bot/helper/ext_utils/bot_utils.py
+++ b/bot/helper/ext_utils/bot_utils.py
@@ -138,18 +138,18 @@ def get_readable_message():
msg += f"\nTo Stop: /{BotCommands.CancelMirror} {download.gid()}"
msg += "\n\n"
if STATUS_LIMIT is not None:
- limit = COUNT + STATUS_LIMIT
- if INDEX >= limit:
+ if INDEX >= COUNT + STATUS_LIMIT:
break
if STATUS_LIMIT is not None:
- if INDEX > limit:
+ if INDEX > COUNT + STATUS_LIMIT:
return None, None
- msg += f"Page: {PAGE_NO}/{pages} | Tasks: {dick_no}\n"
- buttons = button_build.ButtonMaker()
- buttons.sbutton("Previous", "pre")
- buttons.sbutton("Next", "nex")
- button = InlineKeyboardMarkup(buttons.build_menu(2))
- return msg, button
+ if dick_no > STATUS_LIMIT:
+ msg += f"Page: {PAGE_NO}/{pages} | Tasks: {dick_no}\n"
+ buttons = button_build.ButtonMaker()
+ buttons.sbutton("Previous", "pre")
+ buttons.sbutton("Next", "nex")
+ button = InlineKeyboardMarkup(buttons.build_menu(2))
+ return msg, button
return msg, ""
def flip(update, context):
diff --git a/bot/helper/mirror_utils/download_utils/aria2_download.py b/bot/helper/mirror_utils/download_utils/aria2_download.py
index b5fb256..6a0376c 100644
--- a/bot/helper/mirror_utils/download_utils/aria2_download.py
+++ b/bot/helper/mirror_utils/download_utils/aria2_download.py
@@ -61,7 +61,7 @@ class AriaDownloadHelper(DownloadHelper):
dl.getListener().onDownloadError(f'{mssg}.\nYour File/Folder size is {get_readable_file_size(size)}')
aria2.remove([download], force=True)
return
- update_all_messages()
+ update_all_messages()
def __onDownloadComplete(self, api: API, gid):
dl = getDownloadByGid(gid)