Date is converted to YYYY\MM\DD string

This commit is contained in:
2026-04-19 09:02:09 +03:00
parent 2cc0ffc9b5
commit 5f2f4e8e0c
+3 -1
View File
@@ -23,7 +23,9 @@ def get_exif_date(file_path):
date_string = result.stdout.strip() date_string = result.stdout.strip()
if date_string: if date_string:
# Clean up potential trailing units or extra metadata lines # 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." return "Date not found in metadata."
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
# This handles cases where exiftool fails (e.g., corrupted file) # This handles cases where exiftool fails (e.g., corrupted file)