From 7a917dd4973c2ff9638711303796ef3261b7514e Mon Sep 17 00:00:00 2001 From: Jonathan Chan Date: Fri, 16 Jun 2023 11:13:21 +1000 Subject: [PATCH] Fixed issue for downloading one image --- coastsnap/spotteron_batch_download.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coastsnap/spotteron_batch_download.py b/coastsnap/spotteron_batch_download.py index 2a8681f..0a6cdd1 100644 --- a/coastsnap/spotteron_batch_download.py +++ b/coastsnap/spotteron_batch_download.py @@ -169,7 +169,10 @@ class Spotteron: if img.output_filename == images[index-1].output_filename: # Check for sequential duplicate images logger.info(f"Duplicate Spotteron upload: {img.output_filename}") - continue + if len(images) == 1: + break + else: + continue logger.info("Existing images found. Stopping getting images") break