Move path-checked flag to state.py
This commit is contained in:
parent
a41e6ce821
commit
d5c92f89d9
3 changed files with 7 additions and 4 deletions
|
@ -2589,7 +2589,7 @@ class API():
|
||||||
elif window('replaceSMB') == 'true':
|
elif window('replaceSMB') == 'true':
|
||||||
if path.startswith('\\\\'):
|
if path.startswith('\\\\'):
|
||||||
path = 'smb:' + path.replace('\\', '/')
|
path = 'smb:' + path.replace('\\', '/')
|
||||||
if ((window('plex_pathverified') == 'true' and forceCheck is False) or
|
if ((state.PATH_VERIFIED and forceCheck is False) or
|
||||||
omitCheck is True):
|
omitCheck is True):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
@ -2617,12 +2617,12 @@ class API():
|
||||||
if self.askToValidate(path):
|
if self.askToValidate(path):
|
||||||
state.STOP_SYNC = True
|
state.STOP_SYNC = True
|
||||||
path = None
|
path = None
|
||||||
window('plex_pathverified', value='true')
|
state.PATH_VERIFIED = True
|
||||||
else:
|
else:
|
||||||
path = None
|
path = None
|
||||||
elif forceCheck is False:
|
elif forceCheck is False:
|
||||||
if window('plex_pathverified') != 'true':
|
# Only set the flag if we were not force-checking the path
|
||||||
window('plex_pathverified', value='true')
|
state.PATH_VERIFIED = True
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def askToValidate(self, url):
|
def askToValidate(self, url):
|
||||||
|
|
|
@ -50,6 +50,7 @@ class KodiMonitor(Monitor):
|
||||||
# Assume that the user changed the settings so that we can now find the
|
# Assume that the user changed the settings so that we can now find the
|
||||||
# path to all media files
|
# path to all media files
|
||||||
state.STOP_SYNC = False
|
state.STOP_SYNC = False
|
||||||
|
state.PATH_VERIFIED = False
|
||||||
# settings: window-variable
|
# settings: window-variable
|
||||||
items = {
|
items = {
|
||||||
'logLevel': 'plex_logLevel',
|
'logLevel': 'plex_logLevel',
|
||||||
|
|
|
@ -10,6 +10,8 @@ STOP_PKC = False
|
||||||
SUSPEND_LIBRARY_THREAD = False
|
SUSPEND_LIBRARY_THREAD = False
|
||||||
# Set if user decided to cancel sync
|
# Set if user decided to cancel sync
|
||||||
STOP_SYNC = False
|
STOP_SYNC = False
|
||||||
|
# Could we access the paths?
|
||||||
|
PATH_VERIFIED = False
|
||||||
# Set if a Plex-Kodi DB sync is being done - along with
|
# Set if a Plex-Kodi DB sync is being done - along with
|
||||||
# window('plex_dbScan') set to 'true'
|
# window('plex_dbScan') set to 'true'
|
||||||
DB_SCAN = False
|
DB_SCAN = False
|
||||||
|
|
Loading…
Reference in a new issue