Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Jan 9, 2025
1 parent ac7bc33 commit 56bf046
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions deduplidog/deduplidog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down

0 comments on commit 56bf046

Please sign in to comment.