So I’m trying to use the ValidatePrefs function to propagate the Preferences to my library (python code library). For this it is essential to have this function run anytime the user changes their Preferences. However, this does not happen and the function does not run and instead I see a Critical Error entry. Am I doing something wrong ?
2018-06-28 08:07:15,204 (db0) : DEBUG (preferences:198) - Saved the user preferences
2018-06-28 08:07:15,206 (db0) : CRITICAL (sandbox:298) - Function named 'ValidatePrefs' couldnt be found in the current environment
@route(PREFIX + "/ValidatePrefs")
def ValidatePrefs():
val = Prefs['val_to_propagate_key']
my_lib_control.set('val_to_propagate_key', val)
Mods please report this to the concerned Plex developers if this is a genuine bug.
Well previously I did have it in a separate main.py file (residing next to init.py) but it doesn’t seem to be accessible even from there.
Going offtopic… the code/preformatted text option of Discourse needs a better template for the Plex Dark theme, its almost non-viewable with its contrasting white. Also, something that might not be realized outside of the Dev section(s) where its primarily used for code.