From cf6c74bf63e33cc5b3c2514ba416ae4788c824bd Mon Sep 17 00:00:00 2001
From: yasirarism <55983182+yasirarism@users.noreply.github.com>
Date: Tue, 6 Jun 2023 14:30:34 +0000
Subject: [PATCH] Debug err
---
misskaty/plugins/download_upload.py | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/misskaty/plugins/download_upload.py b/misskaty/plugins/download_upload.py
index f44fa166..d2b39974 100644
--- a/misskaty/plugins/download_upload.py
+++ b/misskaty/plugins/download_upload.py
@@ -110,20 +110,20 @@ async def download(client, message):
)
estimated_total_time = downloader.get_eta(human=True)
- try:
- current_message = "Trying to download...\n"
- current_message += f"URL: {url}\n"
- current_message += f"File Name: {custom_file_name}\n"
- current_message += f"Speed: {speed}\n"
- current_message += f"{progress_str}\n"
- current_message += f"{humanbytes(downloaded)} of {humanbytes(total_length)}\n"
- current_message += f"ETA: {estimated_total_time}"
- if round(diff % 10.00) == 0 and current_message != display_message:
- await pesan.edit(disable_web_page_preview=True, text=current_message)
- display_message = current_message
- await asyncio.sleep(10)
- except Exception as e:
- LOGGER.info(str(e))
+ # try:
+ current_message = "Trying to download...\n"
+ current_message += f"URL: {url}\n"
+ current_message += f"File Name: {custom_file_name}\n"
+ current_message += f"Speed: {speed}\n"
+ current_message += f"{progress_str}\n"
+ current_message += f"{humanbytes(downloaded)} of {humanbytes(total_length)}\n"
+ current_message += f"ETA: {estimated_total_time}"
+ if round(diff % 10.00) == 0 and current_message != display_message:
+ await pesan.edit(disable_web_page_preview=True, text=current_message)
+ display_message = current_message
+ await asyncio.sleep(10)
+ # except Exception as e:
+ # LOGGER.info(str(e))
if os.path.exists(download_file_path):
end_t = datetime.now()
ms = (end_t - start_t).seconds