diff --git a/osxphotos/_constants.py b/osxphotos/_constants.py index 13bfafa34..0ac54b54f 100644 --- a/osxphotos/_constants.py +++ b/osxphotos/_constants.py @@ -53,7 +53,8 @@ _PHOTOS_7_MODEL_VERSION = [15000, 15999] # Dev preview: 15134, 12.1: 15331 _PHOTOS_8_MODEL_VERSION = [16000, 16999] # Ventura dev preview: 16119 _PHOTOS_9_MODEL_VERSION = [17000, 17999] # Sonoma dev preview: 17120 -_PHOTOS_10_MODEL_VERSION = [18000, 18999] # Sequoia dev preview: 18164 +_PHOTOS_10B1_MODEL_VERSION = [18000, 18164] # Sequoia dev preview 1: 18164 +_PHOTOS_10_MODEL_VERSION = [18165, 18999] # the preview versions of 12.0.0 had a difference schema for syndication info so need to check model version before processing _PHOTOS_SYNDICATION_MODEL_VERSION = 15323 # 12.0.1 @@ -143,7 +144,7 @@ "MASTER_FINGERPRINT": "ZADDITIONALASSETATTRIBUTES.ZMASTERFINGERPRINT", "HAS_ADJUSTMENTS": "ZASSET.ZHASADJUSTMENTS", }, - 10: { + 9.9: { "ASSET": "ZASSET", "KEYWORD_JOIN": "Z_1KEYWORDS.Z_48KEYWORDS", "ALBUM_JOIN": "Z_31ASSETS.Z_3ASSETS", @@ -159,6 +160,22 @@ "MASTER_FINGERPRINT": "ZADDITIONALASSETATTRIBUTES.ZORIGINALSTABLEHASH", "HAS_ADJUSTMENTS": "ZASSET.ZADJUSTMENTSSTATE", }, + 10: { + "ASSET": "ZASSET", + "KEYWORD_JOIN": "Z_1KEYWORDS.Z_48KEYWORDS", + "ALBUM_JOIN": "Z_30ASSETS.Z_3ASSETS", + "ALBUM_SORT_ORDER": "Z_30ASSETS.Z_FOK_3ASSETS", + "IMPORT_FOK": "null", + "DEPTH_STATE": "ZASSET.ZDEPTHTYPE", + "UTI_ORIGINAL": "ZINTERNALRESOURCE.ZCOMPACTUTI", + "ASSET_ALBUM_JOIN": "Z_30ASSETS.Z_30ALBUMS", + "ASSET_ALBUM_TABLE": "Z_30ASSETS", + "HDR_TYPE": "ZHDRTYPE", + "DETECTED_FACE_PERSON_FK": "ZDETECTEDFACE.ZPERSONFORFACE", + "DETECTED_FACE_ASSET_FK": "ZDETECTEDFACE.ZASSETFORFACE", + "MASTER_FINGERPRINT": "ZADDITIONALASSETATTRIBUTES.ZORIGINALSTABLEHASH", + "HAS_ADJUSTMENTS": "ZASSET.ZADJUSTMENTSSTATE", + }, } # Which version operating systems have been tested @@ -205,6 +222,7 @@ ("14", "2"), ("14", "3"), ("14", "4"), + ("14", "5"), ] # Photos 5 has persons who are empty string if unidentified face diff --git a/osxphotos/photosdb/photosdb_utils.py b/osxphotos/photosdb/photosdb_utils.py index 1c49e6eeb..05b8f6c66 100644 --- a/osxphotos/photosdb/photosdb_utils.py +++ b/osxphotos/photosdb/photosdb_utils.py @@ -18,6 +18,7 @@ _PHOTOS_8_MODEL_VERSION, _PHOTOS_9_MODEL_VERSION, _PHOTOS_10_MODEL_VERSION, + _PHOTOS_10B1_MODEL_VERSION, _TESTED_DB_VERSIONS, ) from ..sqlite_utils import sqlite_open_ro @@ -136,6 +137,8 @@ def get_photos_version_from_model(db_file: str) -> int: return 8 if _PHOTOS_9_MODEL_VERSION[0] <= model_ver <= _PHOTOS_9_MODEL_VERSION[1]: return 9 + if _PHOTOS_10B1_MODEL_VERSION[0] <= model_ver <= _PHOTOS_10B1_MODEL_VERSION[1]: + return 9.9 if _PHOTOS_10_MODEL_VERSION[0] <= model_ver <= _PHOTOS_10_MODEL_VERSION[1]: return 10 logger.warning( diff --git a/tests/test_sequoia_15_0_0_preview.py b/tests/test_sequoia_15_0_0_preview.py index fbcbce860..9e3f527bf 100644 --- a/tests/test_sequoia_15_0_0_preview.py +++ b/tests/test_sequoia_15_0_0_preview.py @@ -348,7 +348,7 @@ def test_db_version(photosdb): def test_photos_version(photosdb): - assert photosdb.photos_version == 10 + assert photosdb.photos_version == 9.9 # dev preview 1 isn't version 10 yet def test_persons(photosdb):