From a84bea86113cc23cf680f4debc54232508ef57bc Mon Sep 17 00:00:00 2001 From: rrr-marble Date: Fri, 2 Jul 2021 09:58:46 +0300 Subject: [PATCH] add: processed counter for img importer --- util/import_photos.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/import_photos.py b/util/import_photos.py index 55a7cac..ee8767b 100644 --- a/util/import_photos.py +++ b/util/import_photos.py @@ -113,10 +113,18 @@ def main(): usage() exit(1) + pics_processed = 0 # process each pic and add it to the database for pic in process_pictures(): update_database() print(pic) # just print into strout for now + pics_processed += 1 + + if pics_processed == 0: + print("No more pictures processed from", argv[1]) + print("Do we have enough permissions?") + else: + print("Pictures processed:", pics_processed) if __name__ == "__main__":