diff --git a/osxphotos/__init__.py b/osxphotos/__init__.py index 99b34786..44c47242 100644 --- a/osxphotos/__init__.py +++ b/osxphotos/__init__.py @@ -580,6 +580,7 @@ class PhotosDB: self._dbphotos[uuid]["latitude"] = row[18] self._dbphotos[uuid]["longitude"] = row[19] self._dbphotos[uuid]["adjustmentUuid"] = row[20] + self._dbphotos[uuid]["adjustmentFormatID"] = None # get details needed to find path of the edited photos and live photos c.execute( @@ -598,8 +599,8 @@ class PhotosDB: # 3 RKModelResource.resourceTag # 4 RKModelResource.UTI # 5 RKVersion.specialType - # 7 RKModelResource.attachedModelType - # 8 RKModelResource.resourceType + # 6 RKModelResource.attachedModelType + # 7 RKModelResource.resourceType # TODO: add live photos # attachedmodeltype is 2, it's a photo, could be more than one @@ -619,7 +620,7 @@ class PhotosDB: if "edit_resource_id" in self._dbphotos[uuid]: logging.warning( f"WARNING: found more than one edit_resource_id for " - f"UUID {row[0]},adjustmentID {row[1]}, modelID {row[2]}" + f"UUID {row[0]},adjustmentUUID {row[1]}, modelID {row[2]}" ) # TODO: I think there should never be more than one edit but # I've seen this once in my library @@ -892,6 +893,8 @@ class PhotosDB: self._dbphotos[uuid]["localAvailability"] = None self._dbphotos[uuid]["remoteAvailability"] = None self._dbphotos[uuid]["isMissing"] = None + self._dbphotos[uuid]["adjustmentUuid"] = None + self._dbphotos[uuid]["adjustmentFormatID"] = None # Get extended description c.execute( @@ -915,7 +918,9 @@ class PhotosDB: # get information about adjusted/edited photos c.execute( - "SELECT ZGENERICASSET.ZUUID, ZGENERICASSET.ZHASADJUSTMENTS, ZUNMANAGEDADJUSTMENT.ZADJUSTMENTFORMATIDENTIFIER " + "SELECT ZGENERICASSET.ZUUID, " + "ZGENERICASSET.ZHASADJUSTMENTS, " + "ZUNMANAGEDADJUSTMENT.ZADJUSTMENTFORMATIDENTIFIER " "FROM ZGENERICASSET, ZUNMANAGEDADJUSTMENT " "JOIN ZADDITIONALASSETATTRIBUTES ON ZADDITIONALASSETATTRIBUTES.ZASSET = ZGENERICASSET.Z_PK " "WHERE ZADDITIONALASSETATTRIBUTES.ZUNMANAGEDADJUSTMENT = ZUNMANAGEDADJUSTMENT.Z_PK " @@ -924,7 +929,7 @@ class PhotosDB: for row in c: uuid = row[0] if uuid in self._dbphotos: - self._dbphotos[uuid]["adjustmentID"] = row[2] + self._dbphotos[uuid]["adjustmentFormatID"] = row[2] else: logging.debug( f"WARNING: found adjustmentformatidentifier {row[2]} but no photo for uuid {row[0]}" @@ -1241,9 +1246,17 @@ class PhotoInfo: return True if self.__info["isMissing"] == 1 else False def hasadjustments(self): - """ True if picture has adjustments """ + """ True if picture has adjustments / edits """ return True if self.__info["hasAdjustments"] == 1 else False + def external_edit(self): + """ Returns True if picture was edited outside of Photos using external editor """ + return ( + True + if self.__info["adjustmentFormatID"] == "com.apple.Photos.externalEdit" + else False + ) + def favorite(self): """ True if picture is marked as favorite """ return True if self.__info["favorite"] == 1 else False diff --git a/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-shm b/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-shm index 42a0273e..e5aa0a6b 100644 Binary files a/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-wal b/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-wal index f1260fa0..d3afacf2 100644 Binary files a/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-wal and b/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite-wal differ diff --git a/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite.lock b/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite.lock index 52c35c51..4626dfe3 100644 --- a/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite.lock +++ b/tests/Test-10.15.1.photoslibrary/database/Photos.sqlite.lock @@ -7,7 +7,7 @@ hostuuid 9575E48B-8D5F-5654-ABAC-4431B1167324 pid - 1368 + 2774 processname photolibraryd uid diff --git a/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite b/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite index 49cb44e8..106b80ab 100644 Binary files a/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite and b/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite differ diff --git a/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite-shm b/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite-shm index 22bb3b82..3d9193a8 100644 Binary files a/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/database/search/psi.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm index 408e7171..d3235436 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal index 952b0d6c..3a59a058 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.AOI.sqlite-wal differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm index 174d7b47..fadecde7 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal index 1c6e47e8..5481500a 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.Nature.sqlite-wal differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm index b7eee96b..bcd5cafe 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal index 54516d7a..f65c7ca8 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.POI.sqlite-wal differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm index bd30baab..6b14eb41 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal index e5db69fc..984e94b2 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSBusinessCategoryCache.ROI.sqlite-wal differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm index ea472c6b..7fd97a14 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal index 7f60bb40..b438464e 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/CLSPublicEventCache.sqlite-wal differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm index 1c0ba8fa..9cb6b028 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal index 69a16da0..49c24909 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGCurationCache.sqlite.sqlite-wal differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist index 5a74827a..0ffe7e55 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PGSearchComputationCache.plist differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist index 96487f61..ce92c5a3 100644 --- a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist +++ b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotoAnalysisServicePreferences.plist @@ -3,24 +3,24 @@ BackgroundHighlightCollection - 2019-11-13T03:46:27Z + 2019-12-01T15:27:50Z BackgroundHighlightEnrichment - 2019-11-13T03:46:27Z + 2019-12-01T15:27:50Z BackgroundJobAssetRevGeocode - 2019-11-13T03:46:27Z + 2019-12-01T15:27:51Z BackgroundJobSearch - 2019-11-13T03:46:27Z + 2019-12-01T15:27:51Z BackgroundPeopleSuggestion - 2019-11-13T03:46:27Z + 2019-12-01T15:27:50Z BackgroundUserBehaviorProcessor - 2019-11-13T03:46:28Z + 2019-12-01T15:27:51Z PhotoAnalysisGraphLastBackgroundGraphConsistencyUpdateJobDateKey 2019-11-13T03:46:28Z PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate 2019-11-13T03:46:27Z PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate - 2019-11-13T03:46:28Z + 2019-12-01T15:27:51Z SiriPortraitDonation - 2019-11-13T03:46:28Z + 2019-12-01T15:27:51Z diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb index 2e94d1f6..eb5dc73d 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm index fe9ac284..0ed3d7e7 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/PhotosGraph/photosgraph.kgdb-shm differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist index 986763a8..b7261d27 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/graph/changetoken.plist differ diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/PhotoAnalysisServicePreferences.plist b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/PhotoAnalysisServicePreferences.plist index 44fb2932..fc1469c4 100644 --- a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/PhotoAnalysisServicePreferences.plist +++ b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/PhotoAnalysisServicePreferences.plist @@ -3,7 +3,7 @@ FaceIDModelLastGenerationKey - 2019-11-13T03:46:28Z + 2019-12-01T15:27:51Z LastContactClassificationKey 2019-11-13T03:46:29Z diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/clustererState.plist b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/clustererState.plist index cb4560b6..614ab824 100644 --- a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/clustererState.plist +++ b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/clustererState.plist @@ -3,6 +3,6 @@ PVClustererBringUpState - 50 + 40 diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/faceWorkerState.plist b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/faceWorkerState.plist index c36206de..a81298d8 100644 --- a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/faceWorkerState.plist +++ b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/faceWorkerState.plist @@ -3,7 +3,7 @@ IncrementalPersonProcessingStage - 6 + 5 PersonBuilderLastMinimumFaceGroupSizeForCreatingMergeCandidates 15 PersonBuilderMergeCandidatesEnabled diff --git a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/vnpersonsmodel.bin b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/vnpersonsmodel.bin index 606e7f6d..4e339236 100644 Binary files a/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/vnpersonsmodel.bin and b/tests/Test-10.15.1.photoslibrary/private/com.apple.photoanalysisd/caches/vision/vnpersonsmodel.bin differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/derivatives/D/DC99FBDD-7A52-4100-A5BB-344131646C30_1_105_c.jpeg b/tests/Test-10.15.1.photoslibrary/resources/derivatives/D/DC99FBDD-7A52-4100-A5BB-344131646C30_1_105_c.jpeg index c64fcafd..5a00c324 100644 Binary files a/tests/Test-10.15.1.photoslibrary/resources/derivatives/D/DC99FBDD-7A52-4100-A5BB-344131646C30_1_105_c.jpeg and b/tests/Test-10.15.1.photoslibrary/resources/derivatives/D/DC99FBDD-7A52-4100-A5BB-344131646C30_1_105_c.jpeg differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/derivatives/masters/D/DC99FBDD-7A52-4100-A5BB-344131646C30_4_5005_c.jpeg b/tests/Test-10.15.1.photoslibrary/resources/derivatives/masters/D/DC99FBDD-7A52-4100-A5BB-344131646C30_4_5005_c.jpeg index 69921245..6e9e2b12 100644 Binary files a/tests/Test-10.15.1.photoslibrary/resources/derivatives/masters/D/DC99FBDD-7A52-4100-A5BB-344131646C30_4_5005_c.jpeg and b/tests/Test-10.15.1.photoslibrary/resources/derivatives/masters/D/DC99FBDD-7A52-4100-A5BB-344131646C30_4_5005_c.jpeg differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/3305.ithmb b/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/3305.ithmb index 77e26284..060a74b9 100644 Binary files a/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/3305.ithmb and b/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/3305.ithmb differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4031.ithmb b/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4031.ithmb index a73fbb67..3f15f9cf 100644 Binary files a/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4031.ithmb and b/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4031.ithmb differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4132.ithmb b/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4132.ithmb index 8c3e78e0..8d252ac9 100644 Binary files a/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4132.ithmb and b/tests/Test-10.15.1.photoslibrary/resources/derivatives/thumbs/4132.ithmb differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/journals/Asset-change.plj b/tests/Test-10.15.1.photoslibrary/resources/journals/Asset-change.plj index af24ba23..5e43f018 100644 Binary files a/tests/Test-10.15.1.photoslibrary/resources/journals/Asset-change.plj and b/tests/Test-10.15.1.photoslibrary/resources/journals/Asset-change.plj differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/journals/HistoryToken.plist b/tests/Test-10.15.1.photoslibrary/resources/journals/HistoryToken.plist index 7b5e2e60..84092a1d 100644 Binary files a/tests/Test-10.15.1.photoslibrary/resources/journals/HistoryToken.plist and b/tests/Test-10.15.1.photoslibrary/resources/journals/HistoryToken.plist differ diff --git a/tests/Test-10.15.1.photoslibrary/resources/renders/D/DC99FBDD-7A52-4100-A5BB-344131646C30.plist b/tests/Test-10.15.1.photoslibrary/resources/renders/D/DC99FBDD-7A52-4100-A5BB-344131646C30.plist new file mode 100644 index 00000000..b298f6be --- /dev/null +++ b/tests/Test-10.15.1.photoslibrary/resources/renders/D/DC99FBDD-7A52-4100-A5BB-344131646C30.plist @@ -0,0 +1,20 @@ + + + + + adjustmentBaseVersion + 0 + adjustmentData + + shkyAAAAAAACAAAA + + adjustmentEditorBundleID + com.apple.Photos + adjustmentFormatIdentifier + com.apple.Photos.externalEdit + adjustmentFormatVersion + 1 + adjustmentTimestamp + 2019-12-01T15:27:48Z + + diff --git a/tests/Test-10.15.1.photoslibrary/resources/renders/D/DC99FBDD-7A52-4100-A5BB-344131646C30_1_201_a.jpeg b/tests/Test-10.15.1.photoslibrary/resources/renders/D/DC99FBDD-7A52-4100-A5BB-344131646C30_1_201_a.jpeg new file mode 100644 index 00000000..7bcb36b9 Binary files /dev/null and b/tests/Test-10.15.1.photoslibrary/resources/renders/D/DC99FBDD-7A52-4100-A5BB-344131646C30_1_201_a.jpeg differ diff --git a/tests/test_catalina_10_15_1.py b/tests/test_catalina_10_15_1.py index 7db2a170..cb2308b0 100644 --- a/tests/test_catalina_10_15_1.py +++ b/tests/test_catalina_10_15_1.py @@ -44,7 +44,7 @@ def test_db_version(): photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB) # assert photosdb.get_db_version() in osxphotos._TESTED_DB_VERSIONS - assert photosdb.get_db_version() == "6000" + assert photosdb.get_db_version() == "6000" def test_os_version(): @@ -231,6 +231,30 @@ def test_hasadjustments2(): assert p.hasadjustments() == False +def test_external_edit1(): + # test image has been edited in external editor + import osxphotos + + photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB) + photos = photosdb.photos(uuid=["DC99FBDD-7A52-4100-A5BB-344131646C30"]) + assert len(photos) == 1 + p = photos[0] + + assert p.external_edit() == True + + +def test_external_edit2(): + # test image has not been edited in external editor + import osxphotos + + photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB) + photos = photosdb.photos(uuid=["E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51"]) + assert len(photos) == 1 + p = photos[0] + + assert p.external_edit() == False + + def test_path_edited1(): # test a valid edited path import osxphotos