MCPcopy Index your code
hub / github.com/pyload/pyload / load_config

Function load_config

module/web/json_app.py:237–252  ·  view source on GitHub ↗
(category, section)

Source from the content-addressed store, hash-verified

235@route("/json/load_config/:category/:section")
236@login_required("SETTINGS")
237def load_config(category, section):
238 conf = None
239 if category == "general":
240 conf = PYLOAD.getConfigDict()
241 elif category == "plugin":
242 conf = PYLOAD.getPluginConfigDict()
243
244 for key, option in conf[section].iteritems():
245 if key in ("desc","outline"): continue
246
247 if ";" in option["type"]:
248 option["list"] = option["type"].split(";")
249
250 option["value"] = decode(option["value"])
251
252 return render_to_response("settings_item.html", {"skey": section, "section": conf[section]})
253
254
255@route("/json/save_config/:category", method="POST")

Callers

nothing calls this directly

Calls 6

decodeFunction · 0.90
render_to_responseFunction · 0.90
getConfigDictMethod · 0.80
getPluginConfigDictMethod · 0.80
splitMethod · 0.80
iteritemsMethod · 0.45

Tested by

no test coverage detected