Rename UX570 files by photo_rename before importing.

This commit is contained in:
voussoir 2026-07-26 14:59:44 -07:00
parent 8b6054511b
commit 6f1cc8862f

View file

@ -47,11 +47,14 @@ def sdingest_all():
continue continue
# Sony ICD UX570 # Sony ICD UX570
if info.get('name').upper() == 'MEMORY CARD': folder = mount.join('PRIVATE\\SONY\\REC_FILE')
folder = mount.join('PRIVATE\\SONY\\REC_FILE') if info.get('name').upper() == 'MEMORY CARD' and folder.is_folder:
if folder.exists: files = list(folder.walk_files())
sdingest_one(folder) pairs = photo_rename.makenames(files, read_mtime=True)
continue for (old, new) in pairs.items():
os.rename(old.absolute_path, new.absolute_path)
sdingest_one(folder)
continue
if dcim is None: if dcim is None:
return 1 return 1