summaryrefslogtreecommitdiffstats
path: root/pyload/webui/app
diff options
context:
space:
mode:
authorGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-19 20:18:32 +0200
committerGravatar Armin <Armin@Armin-PC.diedering.lan> 2015-04-19 20:18:32 +0200
commitcc2ab2fa795ac68a2842a3743d9e4edeb47b56bf (patch)
tree965c07203c30b70c533618b85c88c0ea0f6aab46 /pyload/webui/app
parentadded: colred logs for webui to (currently only for theme "Next") (diff)
downloadpyload-cc2ab2fa795ac68a2842a3743d9e4edeb47b56bf.tar.xz
sorted config in webui ("Activated" is always the top option)
NOTE: The options are sorted like in pyload.conf & plugin.conf For sorting like plugins "__config" - array plugin.conf must be recreated by simply delete the file
Diffstat (limited to 'pyload/webui/app')
-rw-r--r--pyload/webui/app/json.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pyload/webui/app/json.py b/pyload/webui/app/json.py
index 12dce2484..0805e9f5b 100644
--- a/pyload/webui/app/json.py
+++ b/pyload/webui/app/json.py
@@ -202,7 +202,7 @@ def edit_package():
id = int(request.forms.get("pack_id"))
data = {"name": request.forms.get("pack_name").decode("utf8", "ignore"),
"folder": request.forms.get("pack_folder").decode("utf8", "ignore"),
- "password": request.forms.get("pack_pws").decode("utf8", "ignore")}
+ "password": request.forms.get("pack_pws").decode("utf8", "ignore")}
PYLOAD.setPackageData(id, data)
return {"response": "success"}
@@ -249,7 +249,8 @@ def load_config(category, section):
option['value'] = decode(option['value'])
- return render_to_response("settings_item.html", {"skey": section, "section": conf[section]})
+ return render_to_response("settings_item.html", {"sorted_conf": lambda c: sorted(c.items(), key=lambda i: i[1]['idx'] if i[0] not in ("desc", "outline") else 0),
+ "skey": section, "section": conf[section]})
@route('/json/save_config/<category>', method='POST')
@@ -299,7 +300,7 @@ def update_accounts():
elif action == "limitdl" and value.isdigit():
PYLOAD.updateAccount(plugin, user, options={"limitDL": [value]})
elif action == "delete":
- deleted.append((plugin,user))
+ deleted.append((plugin, user))
PYLOAD.removeAccount(plugin, user)