From 6f1cc8862f3a3798d5432ac737ccbdc410d9a650 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 26 Jul 2026 14:59:44 -0700 Subject: [PATCH] Rename UX570 files by photo_rename before importing. --- sdingest.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sdingest.py b/sdingest.py index 12f9f1c..ac1aa26 100644 --- a/sdingest.py +++ b/sdingest.py @@ -47,11 +47,14 @@ def sdingest_all(): continue # Sony ICD UX570 - if info.get('name').upper() == 'MEMORY CARD': - folder = mount.join('PRIVATE\\SONY\\REC_FILE') - if folder.exists: - sdingest_one(folder) - continue + folder = mount.join('PRIVATE\\SONY\\REC_FILE') + if info.get('name').upper() == 'MEMORY CARD' and folder.is_folder: + files = list(folder.walk_files()) + pairs = photo_rename.makenames(files, read_mtime=True) + for (old, new) in pairs.items(): + os.rename(old.absolute_path, new.absolute_path) + sdingest_one(folder) + continue if dcim is None: return 1