Bug fix for --download-missing, #456

This commit is contained in:
Rhet Turnbull
2021-06-19 21:41:54 -07:00
parent 904acbc576
commit 0cd8f32893
3 changed files with 60 additions and 5 deletions

View File

@@ -1,3 +1,3 @@
""" version info """
__version__ = "0.42.41"
__version__ = "0.42.42"

View File

@@ -221,6 +221,7 @@ def _export_photo_uuid_applescript(
timeout=120,
burst=False,
dry_run=False,
overwrite=False,
):
"""Export photo to dest path using applescript to control Photos
If photo is a live photo, exports both the photo and associated .mov file
@@ -300,6 +301,8 @@ def _export_photo_uuid_applescript(
# use the name Photos provided
dest_new = dest / path.name
if not dry_run:
if overwrite and dest_new.exists():
FileUtil.unlink(dest_new)
FileUtil.copy(str(path), str(dest_new))
exported_paths.append(str(dest_new))
return exported_paths
@@ -1194,6 +1197,7 @@ def _export_photo_with_photos_export(
timeout=timeout,
burst=self.burst,
dry_run=dry_run,
overwrite=overwrite,
)
all_results.exported.extend(exported)
except ExportError as e:
@@ -1244,6 +1248,7 @@ def _export_photo_with_photos_export(
timeout=timeout,
burst=self.burst,
dry_run=dry_run,
overwrite=overwrite,
)
all_results.exported.extend(exported)
except ExportError as e: