Monitor Kodi setting changes more closely
This commit is contained in:
parent
2557260002
commit
a0b8a9fa93
1 changed files with 11 additions and 9 deletions
|
@ -45,15 +45,17 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
"""
|
"""
|
||||||
Monitor the PKC settings for changes made by the user
|
Monitor the PKC settings for changes made by the user
|
||||||
"""
|
"""
|
||||||
currentLog = settings('logLevel')
|
# settings: window-variable
|
||||||
if window('plex_logLevel') != currentLog:
|
items = {
|
||||||
# The log level changed, set new prop
|
'logLevel': 'plex_logLevel',
|
||||||
log.debug("New log level: %s" % currentLog)
|
'enableContext': 'plex_context',
|
||||||
window('plex_logLevel', value=currentLog)
|
'plex_restricteduser': 'plex_restricteduser'
|
||||||
current_context = "true" if settings('enableContext') == "true" else ""
|
}
|
||||||
if window('plex_context') != current_context:
|
for settings_value, window_value in items.iteritems():
|
||||||
log.info("New context setting: %s", current_context)
|
if window(window_value) != settings(settings_value):
|
||||||
window('plex_context', value=current_context)
|
log.debug('PKC settings changed: %s is now %s'
|
||||||
|
% (settings_value, settings(settings_value)))
|
||||||
|
window(window_value, value=settings(settings_value))
|
||||||
|
|
||||||
@CatchExceptions(warnuser=False)
|
@CatchExceptions(warnuser=False)
|
||||||
def onNotification(self, sender, method, data):
|
def onNotification(self, sender, method, data):
|
||||||
|
|
Loading…
Reference in a new issue