From 5f2f4e8e0c69782c246d47264125f4d96358782f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksi=20R=C3=A4s=C3=A4nen?= Date: Sun, 19 Apr 2026 09:02:09 +0300 Subject: [PATCH] Date is converted to YYYY\MM\DD string --- photoimport.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/photoimport.py b/photoimport.py index dd4651f..0082f6b 100644 --- a/photoimport.py +++ b/photoimport.py @@ -23,7 +23,9 @@ def get_exif_date(file_path): date_string = result.stdout.strip() if date_string: # Clean up potential trailing units or extra metadata lines - return date_string.split('\n')[0].strip() + cleaned_date = date_string.split('\n')[0].strip() + # Replace '-' with '\' as requested + return cleaned_date.replace('-', '\\') return "Date not found in metadata." except subprocess.CalledProcessError as e: # This handles cases where exiftool fails (e.g., corrupted file)