From 0a7e62477ae28291d91e25d45a14abc58cb04e75 Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Sat, 7 Oct 2023 13:27:48 +0300 Subject: [PATCH] FFMpeg-Compressor: Fix for duplicated file algorithm --- FFMpeg-Compressor/modules/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFMpeg-Compressor/modules/utils.py b/FFMpeg-Compressor/modules/utils.py index 2828e28..010a71f 100644 --- a/FFMpeg-Compressor/modules/utils.py +++ b/FFMpeg-Compressor/modules/utils.py @@ -59,7 +59,7 @@ def add_unprocessed_files(orig_folder): for folder, folders, files in os.walk(orig_folder): for file in files: new_folder = f"{folder}".replace(orig_folder, f"{orig_folder}_compressed") - if len(glob(f"{folder}/{os.path.splitext(file)[0]}*")) != 1: + if len(glob(f"{folder}/{os.path.splitext(file)[0]}.*")) > 1: if len(glob(f"{new_folder}/{file}")): copyfile(f"{folder}/{file}", f"{new_folder}/{file} (copy)") printer.warning(f'Duplicate file has been found! Check manually this files - "{file}", "{file} (copy)"')