diff --git a/osxphotos/__main__.py b/osxphotos/__main__.py index 38244c4f..e15775fd 100644 --- a/osxphotos/__main__.py +++ b/osxphotos/__main__.py @@ -2317,10 +2317,13 @@ def export_photo( # if download_missing and the photo is missing or path doesn't exist, # try to download with Photos - use_photos_export = ( - download_missing and (photo.ismissing or not os.path.exists(photo.path)) - if not use_photos_export - else True + use_photos_export = use_photos_export or ( + download_missing + and ( + photo.ismissing + or not os.path.exists(photo.path) + or (export_edited and photo.path_edited is None) + ) ) # export the photo to each path in dest_paths diff --git a/osxphotos/_version.py b/osxphotos/_version.py index 3cce7bcf..1cb6f908 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,4 +1,4 @@ """ version info """ -__version__ = "0.36.5" +__version__ = "0.36.6" diff --git a/osxphotos/photoinfo/photoinfo.py b/osxphotos/photoinfo/photoinfo.py index de0829c2..3eacc4de 100644 --- a/osxphotos/photoinfo/photoinfo.py +++ b/osxphotos/photoinfo/photoinfo.py @@ -196,18 +196,15 @@ class PhotoInfo: """ absolute path on disk of the edited picture """ """ None if photo has not been edited """ - # TODO: break this code into a _path_edited_4 and _path_edited_5 - # version to simplify the big if/then; same for path_live_photo - try: return self._path_edited except AttributeError: if self._db._db_version <= _PHOTOS_4_VERSION: self._path_edited = self._path_edited_4() - return self._path_edited else: self._path_edited = self._path_edited_5() - return self._path_edited + + return self._path_edited def _path_edited_5(self): """ return path_edited for Photos >= 5 """ @@ -265,8 +262,6 @@ class PhotoInfo: # if self._info["isMissing"] == 1: # photopath = None # path would be meaningless until downloaded - # logging.debug(photopath) - return photopath def _path_edited_4(self):