From fd6e1f0eb4b5ce6153b827a5f9abad6e4410c0e8 Mon Sep 17 00:00:00 2001 From: xenofem Date: Fri, 16 Feb 2024 16:29:55 -0500 Subject: [PATCH] give more opportunities to compare images/pdf between each stage of splitting --- dlibrary/dlibrary.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlibrary/dlibrary.py b/dlibrary/dlibrary.py index e8720c8..b651134 100755 --- a/dlibrary/dlibrary.py +++ b/dlibrary/dlibrary.py @@ -562,6 +562,10 @@ def collate_from_paths(srcs, dest, start_index, exclude): if len(descendant_files_ignore(lo_res_dir, exclude)) == len(descendant_files_ignore(hi_res_dir, exclude)): return collate_from_paths([hi_res_dir], dest, start_index, exclude) + images_vs_pdf = try_collate_images_vs_pdf(srcs, dest, start_index, exclude) + if images_vs_pdf != False: + return images_vs_pdf + for regexes in SPLITS: split_attempt = try_collate_split_regex(srcs, dest, start_index, exclude, **regexes) if split_attempt != False: @@ -576,10 +580,6 @@ def collate_from_paths(srcs, dest, start_index, exclude): else: return None - images_vs_pdf = try_collate_images_vs_pdf(srcs, dest, start_index, exclude) - if images_vs_pdf != False: - return images_vs_pdf - return None def self_and_parents(path):