diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-25 20:37:32 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-25 20:37:32 +0200 |
commit | efee017fb2b3a4cac09233cd01d816d9100a5db5 (patch) | |
tree | 58635208703ae98e2359e160860f7ea7af68445f /module/web | |
parent | RealdebridCom plugin (diff) | |
download | pyload-efee017fb2b3a4cac09233cd01d816d9100a5db5.tar.xz |
rehost plugin, fixed some account management issues
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/json_app.py | 16 | ||||
-rw-r--r-- | module/web/pyload_app.py | 1 | ||||
-rw-r--r-- | module/web/templates/default/settings.html | 2 |
3 files changed, 13 insertions, 6 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py index 36ecf22aa..9e9536a40 100644 --- a/module/web/json_app.py +++ b/module/web/json_app.py @@ -392,17 +392,25 @@ def add_account(): @route("/json/update_accounts", method="POST") @login_required("settings") def update_accounts(): + deleted = [] #dont update deleted accs or they will be created again + for name, value in request.POST.iteritems(): + value = value.strip() + if not value: continue + tmp, user = name.split(";") plugin, action = tmp.split("|") - if action == "password" and value: + if (plugin, user) in deleted: continue + + if action == "password": PYLOAD.update_account(plugin, user, value) - elif action == "time" and value and "-" in value: + elif action == "time" and "-" in value: PYLOAD.update_account(plugin, user, options={"time": [value]}) - elif action == "limitdl" and value and value.isdigit(): + elif action == "limitdl" and value.isdigit(): PYLOAD.update_account(plugin, user, options={"limitDL": [value]}) - elif action == "delete" and value: + elif action == "delete": + deleted.append((plugin,user)) PYLOAD.remove_account(plugin, user) diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 0caf2ece3..47e80c96a 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -282,7 +282,6 @@ def folder(): def config(): conf = PYLOAD.get_config() plugin = PYLOAD.get_plugin_config() - accs = PYLOAD.get_accounts() conf_menu = [] plugin_menu = [] diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html index 776089c47..4c8f0d63e 100644 --- a/module/web/templates/default/settings.html +++ b/module/web/templates/default/settings.html @@ -145,7 +145,7 @@ <td> <input id="{{plugin}}|password;{{account.login}}" name="{{plugin}}|password;{{account.login}}" - type="password" value="{{account.password}}" size="14"/> + type="password" value="{{account.password}}" size="12"/> </td> <td> {% if account.valid %} |