From a92d14b0e7423ffc4133a5862875e691d5894948 Mon Sep 17 00:00:00 2001 From: Anas Tayyar Date: Sun, 15 Dec 2024 10:32:46 +0200 Subject: [PATCH] Update to ubuntu 24.10 - Use zip instead of 7z for compressing --- bot/helper/common.py | 4 ++-- bot/helper/ext_utils/media_utils.py | 2 +- bot/helper/ext_utils/task_manager.py | 2 +- requirements.txt | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bot/helper/common.py b/bot/helper/common.py index 12bedf9bf65..7be2529579f 100644 --- a/bot/helper/common.py +++ b/bot/helper/common.py @@ -717,10 +717,10 @@ async def proceed_compress(self, dl_path, gid, o_files, ft_delete): pswd = self.compress if isinstance(self.compress, str) else "" if self.seed and not self.new_dir: self.new_dir = f"{self.dir}10000" - up_path = f"{self.new_dir}/{self.name}.7z" + up_path = f"{self.new_dir}/{self.name}.zip" delete = False else: - up_path = f"{dl_path}.7z" + up_path = f"{dl_path}.zip" delete = True async with task_dict_lock: task_dict[self.mid] = SevenZStatus(self, gid, "Zip") diff --git a/bot/helper/ext_utils/media_utils.py b/bot/helper/ext_utils/media_utils.py index 038e15a6d1b..9bd96204367 100644 --- a/bot/helper/ext_utils/media_utils.py +++ b/bot/helper/ext_utils/media_utils.py @@ -32,7 +32,7 @@ async def convert_video(listener, video_file, ext, retry=False): output, ] if ext == "mp4": - cmd[7:7] = ["-c:s", "mov_text"] + cmd[7:7] = ["-c:s", "mov_text", "-f", "mp4"] elif ext == "mkv": cmd[7:7] = ["-c:s", "ass"] else: diff --git a/bot/helper/ext_utils/task_manager.py b/bot/helper/ext_utils/task_manager.py index f42a3cae50c..9d94cc78f13 100644 --- a/bot/helper/ext_utils/task_manager.py +++ b/bot/helper/ext_utils/task_manager.py @@ -31,7 +31,7 @@ async def stop_duplicate_check(listener): LOGGER.info(f"Checking File/Folder if already in Drive: {name}") if listener.compress: - name = f"{name}.7z" + name = f"{name}.zip" elif listener.extract: try: name = get_base_name(name) diff --git a/requirements.txt b/requirements.txt index 284a1ab7a27..e9b641e2921 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,6 +17,7 @@ httpx lxml motor natsort +par2cmdline-turbo pillow psutil pymongo