temp fix for shared photos and ismissing
This commit is contained in:
@@ -863,9 +863,9 @@ class PhotosDB:
|
||||
logging.debug(f"i = {i:d}, uuid = '{uuid}")
|
||||
|
||||
# TODO: temporary fix for shared cloud photos
|
||||
if row[16] is not None:
|
||||
logging.debug(f"skipping shared cloud photo {uuid}, ZCLOUDOWNERHASHEDPERSONID: {row[16]}")
|
||||
continue
|
||||
# if row[16] is not None:
|
||||
# logging.debug(f"skipping shared cloud photo {uuid}, ZCLOUDOWNERHASHEDPERSONID: {row[16]}")
|
||||
# continue
|
||||
|
||||
self._dbphotos[uuid] = {}
|
||||
self._dbphotos[uuid]["_uuid"] = uuid # stored here for easier debugging
|
||||
@@ -972,6 +972,28 @@ class PhotosDB:
|
||||
else:
|
||||
self._dbphotos[uuid]["isMissing"] = 0
|
||||
|
||||
# temp fix for cloud shared files
|
||||
c.execute(
|
||||
""" SELECT
|
||||
ZGENERICASSET.ZUUID,
|
||||
ZINTERNALRESOURCE.ZLOCALAVAILABILITY,
|
||||
ZINTERNALRESOURCE.ZREMOTEAVAILABILITY
|
||||
FROM ZGENERICASSET
|
||||
JOIN ZADDITIONALASSETATTRIBUTES ON ZADDITIONALASSETATTRIBUTES.ZASSET = ZGENERICASSET.Z_PK
|
||||
JOIN ZINTERNALRESOURCE ON ZINTERNALRESOURCE.ZASSET = ZADDITIONALASSETATTRIBUTES.ZASSET
|
||||
WHERE ZINTERNALRESOURCE.ZFINGERPRINT IS NULL AND ZINTERNALRESOURCE.ZDATASTORESUBTYPE = 3 """
|
||||
)
|
||||
|
||||
for row in c:
|
||||
uuid = row[0]
|
||||
if uuid in self._dbphotos:
|
||||
self._dbphotos[uuid]["localAvailability"] = row[1]
|
||||
self._dbphotos[uuid]["remoteAvailability"] = row[2]
|
||||
if row[1] != 1:
|
||||
self._dbphotos[uuid]["isMissing"] = 1
|
||||
else:
|
||||
self._dbphotos[uuid]["isMissing"] = 0
|
||||
|
||||
logging.debug(pformat(self._dbphotos))
|
||||
|
||||
# add faces and keywords to photo data
|
||||
|
||||
Reference in New Issue
Block a user