From 0264fc903d5fa28142ab755b10b13242b82b3f0f Mon Sep 17 00:00:00 2001 From: jaydee Date: Tue, 29 Jul 2025 11:31:20 +0200 Subject: [PATCH] build --- auto_import_v2_auto.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/auto_import_v2_auto.py b/auto_import_v2_auto.py index 9549a1d..d963950 100644 --- a/auto_import_v2_auto.py +++ b/auto_import_v2_auto.py @@ -154,6 +154,7 @@ while True: # myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101" # status, output = subprocess.getstatusoutput(myCmd) # If device is set and DCIM exists, move files by date + moved_fine = True if not _DEV == "": if os.path.exists(_DEV_DIR): for file_or_dir in os.listdir(_DEV_DIR): @@ -185,7 +186,7 @@ while True: files_imported += 1 except: logging.debug("failed to move file {}".format(filename)) - + moved_fine = False #myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=100" #subprocess.getstatusoutput(myCmd) else: @@ -201,6 +202,12 @@ while True: files_imported += 1 except: logging.debug("failed to move file {}".format(file_or_dir)) + moved_fine = False + + + if moved_fine: + print("All files moved successfully") + print(f"Removing {_DEV_DIR}*") logging.debug("Umounting")