This commit is contained in:
2025-07-29 11:31:20 +02:00
parent b3076be446
commit 0264fc903d

View File

@@ -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")