Added raise for incorrect geo exif
This commit is contained in:
parent
2a100db981
commit
96f4ab2eb9
@ -45,10 +45,13 @@ async def get_duplicates(hash: str, album: str) -> list:
|
|||||||
duplicates = []
|
duplicates = []
|
||||||
cache = get_duplicates_cache(album)
|
cache = get_duplicates_cache(album)
|
||||||
for image_name in cache.keys():
|
for image_name in cache.keys():
|
||||||
distance = spatial.distance.hamming(
|
try:
|
||||||
hash_hex_to_hash_array(cache[image_name][1]),
|
distance = spatial.distance.hamming(
|
||||||
hash_hex_to_hash_array(hash)
|
hash_hex_to_hash_array(cache[image_name][1]),
|
||||||
)
|
hash_hex_to_hash_array(hash)
|
||||||
|
)
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
print("{0:<30} {1}".format(image_name, distance), flush=True)
|
print("{0:<30} {1}".format(image_name, distance), flush=True)
|
||||||
if distance <= 0.25:
|
if distance <= 0.25:
|
||||||
duplicates.append({"id": cache[image_name][0], "filename": image_name, "difference": distance})
|
duplicates.append({"id": cache[image_name][0], "filename": image_name, "difference": distance})
|
||||||
|
Loading…
Reference in New Issue
Block a user