mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Add unit tests for hash sample optimization
* Instead of keeping md5 samples separate, merge them as one hash computed from the various selected chunks we picked. * We don't need to keep a boolean to see whether or not the user chose to optimize; we can simply compare the value of the threshold, since 0 means no optimization currently active.
This commit is contained in:
@@ -89,7 +89,7 @@ class Scanner:
|
||||
if self.scan_type in {ScanType.Contents, ScanType.Folders}:
|
||||
return engine.getmatches_by_contents(
|
||||
files,
|
||||
bigsize=self.big_file_size_threshold if self.big_file_partial_hashes else 0,
|
||||
bigsize=self.big_file_size_threshold,
|
||||
j=j
|
||||
)
|
||||
else:
|
||||
@@ -222,6 +222,5 @@ class Scanner:
|
||||
scan_type = ScanType.Filename
|
||||
scanned_tags = {"artist", "title"}
|
||||
size_threshold = 0
|
||||
big_file_partial_hashes = True
|
||||
big_file_size_threshold = 100 * 1024 * 1024
|
||||
big_file_size_threshold = 0
|
||||
word_weighting = False
|
||||
|
||||
Reference in New Issue
Block a user