From a8101c1386deb37c4552faf0701bed321f9dd18b Mon Sep 17 00:00:00 2001 From: anasty17 Date: Wed, 1 Jan 2025 19:06:42 +0200 Subject: [PATCH] Change compression ratio Signed-off-by: anasty17 --- bot/helper/common.py | 4 ++-- bot/helper/ext_utils/media_utils.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bot/helper/common.py b/bot/helper/common.py index 97580577..873658d3 100644 --- a/bot/helper/common.py +++ b/bot/helper/common.py @@ -669,7 +669,7 @@ class TaskConfig: if ( not self.seed and self.subproc is not None - and self.subproc.returncode == 0 + and code == 0 ): for file_ in files: if is_archive_split(file_) or is_archive(file_): @@ -761,7 +761,7 @@ class TaskConfig: "7z", f"-v{split_size}b", "a", - "-mx=9", + "-mx=0", f"-p{pswd}", up_path, dl_path, diff --git a/bot/helper/ext_utils/media_utils.py b/bot/helper/ext_utils/media_utils.py index 7f9b0f31..c427985c 100644 --- a/bot/helper/ext_utils/media_utils.py +++ b/bot/helper/ext_utils/media_utils.py @@ -488,7 +488,6 @@ async def split_file( async with listener.subprocess_lock: if listener.is_cancelled: return False - code = listener.subproc.returncode if code == -9: listener.is_cancelled = True return False