Show warning message to remind user to use Estuary for database resets

This commit is contained in:
croneter 2021-05-24 15:51:41 +02:00
parent edf4369454
commit f5b8084543
3 changed files with 24 additions and 0 deletions

View File

@ -155,6 +155,11 @@ msgctxt "#30028"
msgid "PKC-only image caching completed"
msgstr ""
# Warning shown when PKC switches to the Kodi default skin Estuary
msgctxt "#30029"
msgid "To ensure a smooth PlexKodiConnect experience, it is HIGHLY recommended to use Kodi's default skin \"Estuary\" for initial set-up and for possible database resets. Continue?"
msgstr ""
msgctxt "#30030"
msgid "Port Number"
msgstr ""

View File

@ -613,7 +613,11 @@ class InitialSetup(object):
app.ACCOUNT.load()
app.SYNC.load()
return
LOG.info('Showing install questions')
if not utils.default_kodi_skin_warning_message():
LOG.info('Aborting initial setup due to skin')
return
# Additional settings where the user needs to choose
# Direct paths (\\NAS\mymovie.mkv) or addon (http)?
goto_settings = False

View File

@ -518,6 +518,19 @@ def init_dbs():
LOG.info('Init DBs done')
def default_kodi_skin_warning_message():
""""To ensure a smooth PlexKodiConnect experience, it is HIGHLY recommended
to use Kodi's default skin \"Estuary\" for initial set-up and for possible
database resets. Continue?"
"""
if yesno_dialog(lang(29999), lang(30029)):
LOG.warn('User accepted risk of a non-default skin')
return True
else:
LOG.warn('User chose to stop due to skin not being Estuary')
return False
def reset(ask_user=True):
"""
User navigated to the PKC settings, Advanced, and wants to reset the Kodi
@ -526,6 +539,8 @@ def reset(ask_user=True):
# Are you sure you want to reset your local Kodi database?
if ask_user and not yesno_dialog(lang(29999), lang(39600)):
return
if not default_kodi_skin_warning_message():
return
from . import app
# first stop any db sync
app.APP.suspend_threads()