Fix for issue #39

This commit is contained in:
Rhet Turnbull
2020-11-02 05:53:11 -08:00
parent cd710771cd
commit c7c5320587
3 changed files with 10 additions and 12 deletions

View File

@@ -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

View File

@@ -1,4 +1,4 @@
""" version info """
__version__ = "0.36.5"
__version__ = "0.36.6"

View File

@@ -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):