Rename UX570 files by photo_rename before importing.
This commit is contained in:
parent
8b6054511b
commit
6f1cc8862f
1 changed files with 8 additions and 5 deletions
13
sdingest.py
13
sdingest.py
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue