From fb22153d9919ec6fa50b93417d3adc211d6cf8f9 Mon Sep 17 00:00:00 2001 From: jaydee Date: Mon, 23 Sep 2024 18:24:48 +0200 Subject: [PATCH] bitwarden --- handle_imported_video.py | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/handle_imported_video.py b/handle_imported_video.py index 8147c41..ef7a731 100644 --- a/handle_imported_video.py +++ b/handle_imported_video.py @@ -93,20 +93,22 @@ if os.path.exists(_FULL_PATH): print(myCmd) print(os.getcwd()) status, output = subprocess.getstatusoutput(myCmd) - print(output) - print("Moving...") - for p in parts: - try: - shutil.move(p, _PROCESSED) - except: - print(f"Failed to move {p}") - try: - shutil.move(p.replace("MP4", "THM"), _PROCESSED) - except: - print(f"Failed to move {p.replace("MP4", "THM")}") - - try: - shutil.move(p.replace("MP4", "LRV").replace("GH","GL"), _PROCESSED) - except: - print(f"Failed to move {p.replace("MP4", "LRV")}") - \ No newline at end of file + #print(output) + print(status) + if status == 0: + print("Moving...") + for p in parts: + try: + shutil.move(p, _PROCESSED) + except: + print(f"Failed to move {p}") + try: + shutil.move(p.replace("MP4", "THM"), _PROCESSED) + except: + print(f"Failed to move {p.replace("MP4", "THM")}") + + try: + shutil.move(p.replace("MP4", "LRV").replace("GH","GL"), _PROCESSED) + except: + print(f"Failed to move {p.replace("MP4", "LRV")}") + \ No newline at end of file