From 39f7d67c0ed6ada06596d963d641920289a9dc9e Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 12 Apr 2015 08:33:36 -0500 Subject: [PATCH] Revert "Add option to delete user info" This reverts commit 705b5f29d5264db09d79b5a0f439aa9f76375604. --- resources/lib/Utils.py | 10 +--------- service.py | 13 ++----------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/resources/lib/Utils.py b/resources/lib/Utils.py index 99de0d63..6d6d5309 100644 --- a/resources/lib/Utils.py +++ b/resources/lib/Utils.py @@ -154,17 +154,9 @@ def removeDirectory(path): def reset(): - WINDOW = xbmcgui.Window( 10000 ) return_value = xbmcgui.Dialog().yesno("Warning", "Are you sure you want to reset your local database?") - if return_value == 0: return - - # Ask if user information should be deleted too. - return_user = xbmcgui.Dialog().yesno("Warning", "Do you wish to erase your saved Emby user information?") - - if return_user == 1: - WINDOW.setProperty("EraseUserInfo", "true") # first stop any db sync WINDOW = xbmcgui.Window( 10000 ) @@ -197,6 +189,6 @@ def reset(): WINDOW.setProperty("SyncInstallRunDone", "false") dialog = xbmcgui.Dialog() - dialog.ok('Emby Reset', 'Database reset has completed, Kodi will now restart to apply the changes.') + dialog.ok('Emby Reset', 'Database reset has completed, kodi will now restart to apply the changes.') xbmc.executebuiltin("RestartApp") diff --git a/service.py b/service.py index 82024429..95b32aff 100644 --- a/service.py +++ b/service.py @@ -1,8 +1,6 @@ import xbmcaddon import xbmc import xbmcgui -import xbmcvfs - import os import threading import json @@ -120,7 +118,7 @@ class Service(): xbmc.log("Doing_Db_Sync: syncDatabase (Finished) " + str(libSync)) countSync = librarySync.updatePlayCounts() xbmc.log("Doing_Db_Sync: updatePlayCounts (Finished) " + str(countSync)) - xbmc.executebuiltin("UpdateLibrary(video)") + if(libSync and countSync): startupComplete = True else: @@ -135,16 +133,9 @@ class Service(): # If user reset library database. WINDOW = xbmcgui.Window(10000) - addon = xbmcaddon.Addon('plugin.video.emby') - if WINDOW.getProperty("SyncInstallRunDone") == "false": + addon = xbmcaddon.Addon('plugin.video.emby') addon.setSetting("SyncInstallRunDone", "false") - - if WINDOW.getProperty("EraseUserInfo") == "true": - addondir = xbmc.translatePath(addon.getAddonInfo('profile')) - dataPath = os.path.join(addondir + "settings.xml") - xbmcvfs.delete(dataPath) - xbmc.log("Deleted saved user information for: %s" % user.currUser) if (self.newWebSocketThread != None): ws.stopClient()