Detect duplicate and sequential Spotteron uploads

master
Jonathan Chan 1 year ago
parent 4406a74b3b
commit ce9994a954

@ -161,10 +161,16 @@ class Spotteron:
if not images:
logger.info("No images returned. Check correct root_id is supplied")
break
for img in images:
for index, img in enumerate(images):
if img.exists(output_folder) and overwrite == False:
if img.output_filename == images[index-1].output_filename: # Check for sequential duplicate images
logger.info(f"Duplicate Spotteron upload: {img.output_filename}")
continue
logger.info("Existing images found. Stopping getting images")
break
else:

Loading…
Cancel
Save