From 56bf046d57d9445cf7b1f50221378233bf4e08d7 Mon Sep 17 00:00:00 2001 From: Edvard Rejthar Date: Thu, 9 Jan 2025 16:02:47 +0100 Subject: [PATCH] WIP --- deduplidog/deduplidog.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/deduplidog/deduplidog.py b/deduplidog/deduplidog.py index 4fc1151..270cd48 100644 --- a/deduplidog/deduplidog.py +++ b/deduplidog/deduplidog.py @@ -700,10 +700,13 @@ def _find_similar(self, work_file: Path, candidates: list[Path]): """ compare by date and size """ for original in candidates: ost, wst = original.stat(), work_file.stat() + print("703: ost,wst", ost, wst) # TODO + print("704: wst.st_mtime", wst.st_mtime) # TODO + print("704: ost.st_mtime", ost.st_mtime) # TODO if (self.match.ignore_date - or wst.st_mtime == ost.st_mtime - or self.match.tolerate_hour and self.match.tolerate_hour[0] <= (wst.st_mtime - ost.st_mtime)/3600 <= self.match.tolerate_hour[1] - ) and (self.match.ignore_size or wst.st_size == ost.st_size and (not self.match.checksum or crc(original) == crc(work_file))): + or wst.st_mtime == ost.st_mtime + or self.match.tolerate_hour and self.match.tolerate_hour[0] <= (wst.st_mtime - ost.st_mtime)/3600 <= self.match.tolerate_hour[1] + ) and (self.match.ignore_size or wst.st_size == ost.st_size and (not self.match.checksum or crc(original) == crc(work_file))): return original def _find_similar_media(self, work_file: Path, comparing_image: bool, candidates: list[Path]):