From 1a6b87dd586e676672a219fc6fc7fc04f9901240 Mon Sep 17 00:00:00 2001 From: Anas <77075674+anasty17@users.noreply.github.com> Date: Sun, 13 Jun 2021 13:24:52 +0300 Subject: [PATCH] Update aria2_download.py (#172) --- bot/helper/mirror_utils/download_utils/aria2_download.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bot/helper/mirror_utils/download_utils/aria2_download.py b/bot/helper/mirror_utils/download_utils/aria2_download.py index c6f0d22d151..c2fd57a8a5e 100644 --- a/bot/helper/mirror_utils/download_utils/aria2_download.py +++ b/bot/helper/mirror_utils/download_utils/aria2_download.py @@ -40,10 +40,8 @@ def __onDownloadStarted(self, api, gid): if TORRENT_DIRECT_LIMIT is not None: LOGGER.info(f"Checking File/Folder Size...") - with download_dict_lock: - for down in list(download_dict.values()): - sleep(1) - size = down.size_raw() + sleep(1.5) + size = aria2.get_download(gid).total_length limit = TORRENT_DIRECT_LIMIT limit = limit.split(' ', maxsplit=1) limitint = int(limit[0])