def Start(): HTTP.CacheTime = 0 HTTP.Headers['User-agent'] = OS_PLEX_USERAGENT Log.Debug("START CALLED") logger.registerLoggingHander(DEPENDENCY_MODULE_NAMES) # configured cache to be in memory as per https://github.com/Diaoul/subliminal/issues/303 subliminal.cache_region.configure('dogpile.cache.memory')
def Start(): HTTP.CacheTime = 0 HTTP.Headers['User-agent'] = OS_PLEX_USERAGENT logger.registerLoggingHander(DEPENDENCY_MODULE_NAMES) # configured cache to be in memory as per https://github.com/Diaoul/subliminal/issues/303 subliminal.region.configure('dogpile.cache.memory') # init defaults; perhaps not the best idea to use ValidatePrefs here, but we'll see ValidatePrefs() Log.Debug(config.full_version) if not config.plex_api_working: Log.Error(lib_unaccessible_error) return scheduler.run()
def ValidatePrefs(): Core.log.setLevel(logging.DEBUG) Log.Debug("Validate Prefs called.") config.initialize() scheduler.setup_tasks() set_refresh_menu_state(None) if Prefs["log_console"]: Core.log.addHandler(logger.console_handler) Log.Debug("Logging to console from now on") else: Core.log.removeHandler(logger.console_handler) Log.Debug("Stop logging to console") Log.Debug("Setting log-level to %s", Prefs["log_level"]) logger.registerLoggingHander(DEPENDENCY_MODULE_NAMES, level=Prefs["log_level"]) Core.log.setLevel(logging.getLevelName(Prefs["log_level"])) return
def ValidatePrefs(): Core.log.setLevel(logging.DEBUG) Log.Debug("Validate Prefs called.") # cache the channel state update_dict = False restart = False if "channel_enabled" not in Dict: update_dict = True elif Dict["channel_enabled"] != Prefs["enable_channel"]: Log.Debug("Channel features %s, restarting plugin", "enabled" if Prefs["enable_channel"] else "disabled") update_dict = True restart = True if update_dict: Dict["channel_enabled"] = Prefs["enable_channel"] Dict.Save() if restart: DispatchRestart() config.initialize() scheduler.setup_tasks() set_refresh_menu_state(None) if Prefs["log_console"]: Core.log.addHandler(logger.console_handler) Log.Debug("Logging to console from now on") else: Core.log.removeHandler(logger.console_handler) Log.Debug("Stop logging to console") Log.Debug("Setting log-level to %s", Prefs["log_level"]) logger.registerLoggingHander(DEPENDENCY_MODULE_NAMES, level=Prefs["log_level"]) Core.log.setLevel(logging.getLevelName(Prefs["log_level"])) return