mirror of
https://gitlab.sectorq.eu/jaydee/auto_import.git
synced 2025-12-14 10:34:53 +01:00
build
This commit is contained in:
@@ -77,15 +77,8 @@ if int(output) > 0:
|
|||||||
logging.info("Running already!")
|
logging.info("Running already!")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
# List all disk UUIDs and write output to a temp file
|
|
||||||
myCmd = "ls /dev/disk/by-uuid"
|
|
||||||
status, output = subprocess.getstatusoutput(myCmd)
|
|
||||||
f = open("/tmp/lalala", "w")
|
|
||||||
contents = f.write(output)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
# Set destination and initialize variables
|
# Set destination and initialize variables
|
||||||
_DEST = "/media/nas/nas-photo/imported"
|
_DEST = "/share/Photo/imported"
|
||||||
_DEV = ""
|
_DEV = ""
|
||||||
|
|
||||||
files_imported = 0
|
files_imported = 0
|
||||||
@@ -96,6 +89,7 @@ while True:
|
|||||||
print(status)
|
print(status)
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
if status == 0:
|
if status == 0:
|
||||||
|
print("Device mounted")
|
||||||
_DEV_MOUNT = f"/share/external/DEV3301_1"
|
_DEV_MOUNT = f"/share/external/DEV3301_1"
|
||||||
_DEV_DIR = f"{_DEV_MOUNT}/DCIM"
|
_DEV_DIR = f"{_DEV_MOUNT}/DCIM"
|
||||||
_IMP_FILE = f"{_DEV_MOUNT}/auto_import"
|
_IMP_FILE = f"{_DEV_MOUNT}/auto_import"
|
||||||
|
|||||||
Reference in New Issue
Block a user