Prevent loop if user decides not to reset db yet

This commit is contained in:
angelblue05 2015-09-07 04:12:28 -05:00
parent 5592429863
commit c698e39bb2
2 changed files with 4 additions and 2 deletions

View file

@ -1032,10 +1032,11 @@ class LibrarySync(threading.Thread):
utils.settings("dbCreatedWithVersion",WINDOW.getProperty('minDBVersion'))
# END TEMPORARY CODE
if (utils.settings("SyncInstallRunDone") == "true" and LooseVersion(utils.settings("dbCreatedWithVersion")) < LooseVersion(WINDOW.getProperty('minDBVersion'))):
if (utils.settings("SyncInstallRunDone") == "true" and LooseVersion(utils.settings("dbCreatedWithVersion")) < LooseVersion(WINDOW.getProperty('minDBVersion'))) and WINDOW.getProperty('minDBVersionCheck') != "true":
return_value = xbmcgui.Dialog().yesno("DB Version", "Detected the DB needs to be recreated for\nthis version of Emby for Kodi.\nProceed?")
if return_value == 0:
xbmcgui.Dialog().ok("Emby for Kodi","Emby for Kodi may not work\ncorrectly until the database is reset.\n")
WINDOW.setProperty('minDBVersionCheck', "true")
else:
utils.reset()

View file

@ -60,8 +60,9 @@ class Service():
WINDOW.clearProperty('Server_status')
WINDOW.clearProperty('startup')
WINDOW.clearProperty('OnWakeSync')
WINDOW.clearProperty('minDBVersionCheck')
#Set min DB version
# Set min DB version
WINDOW.setProperty('minDBVersion','1.1.33')
embyProperty = WINDOW.getProperty('Emby.nodes.total')