Move Kodi DB check flag to state.py

This commit is contained in:
croneter 2017-08-21 19:42:41 +02:00
parent 66eb599a14
commit ce508257a3
3 changed files with 5 additions and 4 deletions

View file

@ -1506,7 +1506,7 @@ class LibrarySync(Thread):
return return
xbmc.sleep(1000) xbmc.sleep(1000)
if (window('plex_dbCheck') != "true" and installSyncDone): if state.KODI_DB_CHECKED is False and installSyncDone:
# Install sync was already done, don't force-show dialogs # Install sync was already done, don't force-show dialogs
self.force_dialog = False self.force_dialog = False
# Verify the validity of the database # Verify the validity of the database
@ -1529,8 +1529,7 @@ class LibrarySync(Thread):
else: else:
reset() reset()
break break
state.KODI_DB_CHECKED = True
window('plex_dbCheck', value="true")
if not startupComplete: if not startupComplete:
# Also runs when first installed # Also runs when first installed

View file

@ -32,6 +32,8 @@ RUN_LIB_SCAN = None
# Stemming from the PKC settings.xml # Stemming from the PKC settings.xml
# Shall we show Kodi dialogs when synching? # Shall we show Kodi dialogs when synching?
SYNC_DIALOG = True SYNC_DIALOG = True
# Have we already checked the Kodi DB on consistency?
KODI_DB_CHECKED = False
# Along with window('plex_authenticated') # Along with window('plex_authenticated')

View file

@ -107,7 +107,7 @@ class Service():
# Reset window props for profile switch # Reset window props for profile switch
properties = [ properties = [
"plex_online", "plex_serverStatus", "plex_onWake", "plex_online", "plex_serverStatus", "plex_onWake",
"plex_dbCheck", "plex_kodiScan", "plex_kodiScan",
"plex_shouldStop", "plex_dbScan", "plex_shouldStop", "plex_dbScan",
"plex_initialScan", "plex_customplayqueue", "plex_playbackProps", "plex_initialScan", "plex_customplayqueue", "plex_playbackProps",
"pms_token", "plex_token", "pms_token", "plex_token",