add print statement to duplicate detection

pull/136/head
Aevann 2023-03-05 12:11:50 +02:00
parent a4f2f48d82
commit 0084de4273
1 changed files with 2 additions and 0 deletions

View File

@ -205,8 +205,10 @@ def process_image(filename:str, v, resize=0, trim=False, uploader_id:Optional[in
i_hash = str(imagehash.phash(i))
if i_hash in hashes.keys():
print(f'\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\nRemove one of these existing duplicates please:\n\n', flush=True)
print(hashes[i_hash], flush=True)
print(img_path, flush=True)
print(f'\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n', flush=True)
else: hashes[i_hash] = img_path
with Image.open(filename) as i: