mirror of
				https://github.com/arsenetar/dupeguru.git
				synced 2025-09-11 17:58:17 +00:00 
			
		
		
		
	Fix picture mode's fuzzy block scanner threshold
It was always wrongly set to it's weirld old default 75 threshold. fixes #387
This commit is contained in:
		
							parent
							
								
									0206f2fd15
								
							
						
					
					
						commit
						ac8a336c4a
					
				| @ -135,7 +135,7 @@ def async_compare(ref_ids, other_ids, dbname, threshold, picinfo): | |||||||
|     cache.close() |     cache.close() | ||||||
|     return results |     return results | ||||||
| 
 | 
 | ||||||
| def getmatches(pictures, cache_path, threshold=75, match_scaled=False, j=job.nulljob): | def getmatches(pictures, cache_path, threshold, match_scaled=False, j=job.nulljob): | ||||||
|     def get_picinfo(p): |     def get_picinfo(p): | ||||||
|         if match_scaled: |         if match_scaled: | ||||||
|             return (None, p.is_ref) |             return (None, p.is_ref) | ||||||
|  | |||||||
| @ -13,7 +13,6 @@ from . import matchblock, matchexif | |||||||
| class ScannerPE(Scanner): | class ScannerPE(Scanner): | ||||||
|     cache_path = None |     cache_path = None | ||||||
|     match_scaled = False |     match_scaled = False | ||||||
|     threshold = 75 |  | ||||||
| 
 | 
 | ||||||
|     @staticmethod |     @staticmethod | ||||||
|     def get_scan_options(): |     def get_scan_options(): | ||||||
| @ -24,7 +23,13 @@ class ScannerPE(Scanner): | |||||||
| 
 | 
 | ||||||
|     def _getmatches(self, files, j): |     def _getmatches(self, files, j): | ||||||
|         if self.scan_type == ScanType.FuzzyBlock: |         if self.scan_type == ScanType.FuzzyBlock: | ||||||
|             return matchblock.getmatches(files, self.cache_path, self.threshold, self.match_scaled, j) |             return matchblock.getmatches( | ||||||
|  |                 files, | ||||||
|  |                 cache_path=self.cache_path, | ||||||
|  |                 threshold=self.min_match_percentage, | ||||||
|  |                 match_scaled=self.match_scaled, | ||||||
|  |                 j=j | ||||||
|  |             ) | ||||||
|         elif self.scan_type == ScanType.ExifTimestamp: |         elif self.scan_type == ScanType.ExifTimestamp: | ||||||
|             return matchexif.getmatches(files, self.match_scaled, j) |             return matchexif.getmatches(files, self.match_scaled, j) | ||||||
|         else: |         else: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user