Small fix to database version logic to look into issue #102

This commit is contained in:
Rhet Turnbull
2020-04-15 14:09:47 -07:00
parent 99b5b54c6d
commit d542cda17d
3 changed files with 6 additions and 4 deletions

View File

@@ -16,8 +16,9 @@ _TESTED_DB_VERSIONS = ["6000", "4025", "4016", "3301", "2622"]
# only version 3 - 4 have RKVersion.selfPortrait # only version 3 - 4 have RKVersion.selfPortrait
_PHOTOS_3_VERSION = "3301" _PHOTOS_3_VERSION = "3301"
# versions later than this have a different database structure # versions 5.0 and later have a different database structure
_PHOTOS_5_VERSION = "6000" _PHOTOS_4_VERSION = "4025" # latest Mojove version on 10.14.6
_PHOTOS_5_VERSION = "6000" # seems to be current on 10.15.1 through 10.14.4
# which major version operating systems have been tested # which major version operating systems have been tested
_TESTED_OS_VERSIONS = ["12", "13", "14", "15"] _TESTED_OS_VERSIONS = ["12", "13", "14", "15"]

View File

@@ -1,3 +1,3 @@
""" version info """ """ version info """
__version__ = "0.27.4" __version__ = "0.27.5"

View File

@@ -19,6 +19,7 @@ from ._constants import (
_MOVIE_TYPE, _MOVIE_TYPE,
_PHOTO_TYPE, _PHOTO_TYPE,
_PHOTOS_3_VERSION, _PHOTOS_3_VERSION,
_PHOTOS_4_VERSION,
_PHOTOS_5_VERSION, _PHOTOS_5_VERSION,
_TESTED_DB_VERSIONS, _TESTED_DB_VERSIONS,
_TESTED_OS_VERSIONS, _TESTED_OS_VERSIONS,
@@ -258,7 +259,7 @@ class PhotosDB:
if _debug(): if _debug():
logging.debug(f"library = {library_path}, masters = {masters_path}") logging.debug(f"library = {library_path}, masters = {masters_path}")
if int(self._db_version) < int(_PHOTOS_5_VERSION): if int(self._db_version) <= int(_PHOTOS_4_VERSION):
self._process_database4() self._process_database4()
else: else:
self._process_database5() self._process_database5()