Fixed error for missing photo path, #547
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
""" version info """
|
""" version info """
|
||||||
|
|
||||||
__version__ = "0.43.5"
|
__version__ = "0.43.6"
|
||||||
|
|||||||
@@ -856,7 +856,7 @@ class PhotoInfo:
|
|||||||
if self._db._db_version <= _PHOTOS_4_VERSION:
|
if self._db._db_version <= _PHOTOS_4_VERSION:
|
||||||
if self.live_photo and not self.ismissing:
|
if self.live_photo and not self.ismissing:
|
||||||
live_model_id = self._info["live_model_id"]
|
live_model_id = self._info["live_model_id"]
|
||||||
if live_model_id == None:
|
if live_model_id is None:
|
||||||
logging.debug(f"missing live_model_id: {self._uuid}")
|
logging.debug(f"missing live_model_id: {self._uuid}")
|
||||||
photopath = None
|
photopath = None
|
||||||
else:
|
else:
|
||||||
@@ -877,28 +877,20 @@ class PhotoInfo:
|
|||||||
# photos 4 has "isOnDisk" column we could check
|
# photos 4 has "isOnDisk" column we could check
|
||||||
# or could do the actual check with "isfile"
|
# or could do the actual check with "isfile"
|
||||||
# TODO: should this be a warning or debug?
|
# TODO: should this be a warning or debug?
|
||||||
logging.debug(
|
|
||||||
f"MISSING PATH: live photo path for UUID {self._uuid} should be at {photopath} but does not appear to exist"
|
|
||||||
)
|
|
||||||
photopath = None
|
photopath = None
|
||||||
else:
|
else:
|
||||||
photopath = None
|
photopath = None
|
||||||
else:
|
elif self.live_photo and self.path and not self.ismissing:
|
||||||
# Photos 5
|
filename = pathlib.Path(self.path)
|
||||||
if self.live_photo and not self.ismissing:
|
photopath = filename.parent.joinpath(f"{filename.stem}_3.mov")
|
||||||
filename = pathlib.Path(self.path)
|
photopath = str(photopath)
|
||||||
photopath = filename.parent.joinpath(f"{filename.stem}_3.mov")
|
if not os.path.isfile(photopath):
|
||||||
photopath = str(photopath)
|
# In testing, I've seen occasional missing movie for live photo
|
||||||
if not os.path.isfile(photopath):
|
# these appear to be valid -- e.g. video component not yet downloaded from iCloud
|
||||||
# In testing, I've seen occasional missing movie for live photo
|
# TODO: should this be a warning or debug?
|
||||||
# these appear to be valid -- e.g. video component not yet downloaded from iCloud
|
|
||||||
# TODO: should this be a warning or debug?
|
|
||||||
logging.debug(
|
|
||||||
f"MISSING PATH: live photo path for UUID {self._uuid} should be at {photopath} but does not appear to exist"
|
|
||||||
)
|
|
||||||
photopath = None
|
|
||||||
else:
|
|
||||||
photopath = None
|
photopath = None
|
||||||
|
else:
|
||||||
|
photopath = None
|
||||||
|
|
||||||
return photopath
|
return photopath
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user