From 0e1902cc917cbb25f63b68e30fa458cfe34e2d22 Mon Sep 17 00:00:00 2001 From: Croneter Date: Mon, 14 May 2018 20:51:14 +0200 Subject: [PATCH] Don't ask user for DB reset if forced by PKC --- resources/lib/librarysync.py | 2 +- resources/lib/utils.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index e24b89f7..1d3b75e0 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1579,7 +1579,7 @@ class LibrarySync(Thread): heading='{plex}', line1=lang(29999) + lang(39402)) else: - utils.reset() + utils.reset(ask_user=False) break kodi_db_version_checked = True diff --git a/resources/lib/utils.py b/resources/lib/utils.py index b993e909..f7a3e2ac 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -442,15 +442,15 @@ def wipe_database(): settings('SyncInstallRunDone', value="false") -def reset(): +def reset(ask_user=True): """ User navigated to the PKC settings, Advanced, and wants to reset the Kodi database and possibly PKC entirely """ # Are you sure you want to reset your local Kodi database? - if not dialog('yesno', - heading='{plex} %s ' % language(30132), - line1=language(39600)): + if ask_user and not dialog('yesno', + heading='{plex} %s ' % language(30132), + line1=language(39600)): return # first stop any db sync @@ -472,9 +472,9 @@ def reset(): # Reset all PlexKodiConnect Addon settings? (this is usually NOT # recommended and unnecessary!) - if dialog('yesno', - heading='{plex} %s ' % language(30132), - line1=language(39603)): + if ask_user and dialog('yesno', + heading='{plex} %s ' % language(30132), + line1=language(39603)): # Delete the settings addon = xbmcaddon.Addon() addondir = try_decode(xbmc.translatePath(addon.getAddonInfo('profile')))