Fixed bug in --download-missing to fix issue #64
This commit is contained in:
@@ -1136,6 +1136,7 @@ def export_photo(
|
||||
filename,
|
||||
sidecar_json=sidecar_json,
|
||||
sidecar_xmp=sidecar_xmp,
|
||||
live_photo=export_live,
|
||||
overwrite=overwrite,
|
||||
use_photos_export=download_missing,
|
||||
)
|
||||
@@ -1160,22 +1161,22 @@ def export_photo(
|
||||
else:
|
||||
click.echo(f"Skipping missing edited photo for {filename}")
|
||||
|
||||
if export_live and photo.live_photo and photo.path_live_photo is not None:
|
||||
# if destination exists, will be overwritten regardless of overwrite
|
||||
# so that name matches name of live photo
|
||||
live_name = pathlib.Path(photo_path)
|
||||
live_name = f"{live_name.stem}.mov"
|
||||
# if export_live and photo.live_photo and photo.path_live_photo is not None:
|
||||
# # if destination exists, will be overwritten regardless of overwrite
|
||||
# # so that name matches name of live photo
|
||||
# live_name = pathlib.Path(photo_path)
|
||||
# live_name = f"{live_name.stem}.mov"
|
||||
|
||||
src_live = photo.path_live_photo
|
||||
dest_live = pathlib.Path(photo_path).parent / pathlib.Path(live_name)
|
||||
# src_live = photo.path_live_photo
|
||||
# dest_live = pathlib.Path(photo_path).parent / pathlib.Path(live_name)
|
||||
|
||||
if src_live is not None:
|
||||
if verbose:
|
||||
click.echo(f"Exporting live photo video of {filename} as {live_name}")
|
||||
# if src_live is not None:
|
||||
# if verbose:
|
||||
# click.echo(f"Exporting live photo video of {filename} as {live_name}")
|
||||
|
||||
_copy_file(src_live, str(dest_live))
|
||||
else:
|
||||
click.echo(f"Skipping missing live movie for {filename}")
|
||||
# _copy_file(src_live, str(dest_live))
|
||||
# else:
|
||||
# click.echo(f"Skipping missing live movie for {filename}")
|
||||
|
||||
return photo_path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user