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/json_app.py | |
parent | RealdebridCom plugin (diff) | |
download | pyload-efee017fb2b3a4cac09233cd01d816d9100a5db5.tar.xz |
rehost plugin, fixed some account management issues
Diffstat (limited to 'module/web/json_app.py')
-rw-r--r-- | module/web/json_app.py | 16 |
1 files changed, 12 insertions, 4 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) |