Set new config value. :param category: :param option: :param value: new config value :param section: 'plugin' or 'core
(self, category, option, value, section="core")
| 139 | |
| 140 | @permission(PERMS.SETTINGS) |
| 141 | def setConfigValue(self, category, option, value, section="core"): |
| 142 | """Set new config value. |
| 143 | |
| 144 | :param category: |
| 145 | :param option: |
| 146 | :param value: new config value |
| 147 | :param section: 'plugin' or 'core |
| 148 | """ |
| 149 | self.core.hookManager.dispatchEvent("configChanged", category, option, value, section) |
| 150 | |
| 151 | if section == "core": |
| 152 | self.core.config[category][option] = value |
| 153 | |
| 154 | if option in ("limit_speed", "max_speed"): #not so nice to update the limit |
| 155 | self.core.requestFactory.updateBucket() |
| 156 | |
| 157 | elif section == "plugin": |
| 158 | self.core.config.setPlugin(category, option, value) |
| 159 | |
| 160 | @permission(PERMS.SETTINGS) |
| 161 | def getConfig(self): |
nothing calls this directly
no test coverage detected