Added version check for M1 macs

This commit is contained in:
Rhet Turnbull 2021-01-11 20:27:51 -08:00
parent eec960861e
commit 27f779b16c
3 changed files with 19 additions and 11 deletions

View File

@ -58,8 +58,16 @@ _DB_TABLE_NAMES = {
},
}
# which major version operating systems have been tested
_TESTED_OS_VERSIONS = ["12", "13", "14", "15", "16"]
# which version operating systems have been tested
_TESTED_OS_VERSIONS = [
("10", "12"),
("10", "13"),
("10", "14"),
("10", "15"),
("10", "16"),
("11", "0"),
("11", "1"),
]
# Photos 5 has persons who are empty string if unidentified face
_UNKNOWN_PERSON = "_UNKNOWN_"

View File

@ -1,3 +1,3 @@
""" version info """
__version__ = "0.39.15"
__version__ = "0.39.16"

View File

@ -85,12 +85,12 @@ class PhotosDB:
# Check OS version
system = platform.system()
(_, major, _) = _get_os_version()
if system != "Darwin" or (major not in _TESTED_OS_VERSIONS):
(ver, major, _) = _get_os_version()
if system != "Darwin" or ((ver, major) not in _TESTED_OS_VERSIONS):
logging.warning(
f"WARNING: This module has only been tested with MacOS 10."
f"[{', '.join(_TESTED_OS_VERSIONS)}]: "
f"you have {system}, OS version: {major}"
f"WARNING: This module has only been tested with macOS versions "
f"[{', '.join(f'{v}.{m}' for (v, m) in _TESTED_OS_VERSIONS)}]: "
f"you have {system}, OS version: {ver}.{major}"
)
if verbose is None:
@ -1160,9 +1160,9 @@ class PhotosDB:
self._dbphotos[uuid]["original_orientation"] = row[38]
self._dbphotos[uuid]["original_filesize"] = row[39]
# visibility state
self._dbphotos[uuid]["visibility_state"] = row[42]
self._dbphotos[uuid]["visible"] = row[42] == 1
# visibility state
self._dbphotos[uuid]["visibility_state"] = row[42]
self._dbphotos[uuid]["visible"] = row[42] == 1
# import session not yet handled for Photos 4
self._dbphotos[uuid]["import_session"] = None