Move minimal Kodi DB version to variables.py

This commit is contained in:
croneter 2018-02-09 13:57:58 +01:00
parent 31d42d0b04
commit 96be262f78
2 changed files with 5 additions and 4 deletions

View file

@ -1527,11 +1527,9 @@ class LibrarySync(Thread):
self.force_dialog = False
# Verify the validity of the database
currentVersion = settings('dbCreatedWithVersion')
minVersion = window('plex_minDBVersion')
if not compare_version(currentVersion, minVersion):
if not compare_version(currentVersion, v.MIN_DB_VERSION):
log.warn("Db version out of date: %s minimum version "
"required: %s" % (currentVersion, minVersion))
"required: %s", (currentVersion, v.MIN_DB_VERSION))
# DB out of date. Proceed to recreate?
resp = dialog('yesno',
heading=lang(29999),

View file

@ -74,6 +74,9 @@ COMPANION_PORT = int(_ADDON.getSetting('companionPort'))
# Unique ID for this Plex client; also see clientinfo.py
PKC_MACHINE_IDENTIFIER = None
# Minimal PKC version needed for the Kodi database - otherwise need to recreate
MIN_DB_VERSION = '2.0.0'
# Database paths
_DB_VIDEO_VERSION = {
13: 78, # Gotham