diff options
author | Paul King <devnull@localhost> | 2011-05-16 20:40:25 +0200 |
---|---|---|
committer | Paul King <devnull@localhost> | 2011-05-16 20:40:25 +0200 |
commit | d94868828e60167b2dbb20f39ea4282fd636844e (patch) | |
tree | aa563f6ee730166853555a8fc9b3735c260d09a6 /module/web | |
parent | Several Crypters and Hosters fixes, improvements, python2.5 issues... (diff) | |
download | pyload-d94868828e60167b2dbb20f39ea4282fd636844e.tar.xz |
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/json_app.py | 4 | ||||
-rw-r--r-- | module/web/pyload_app.py | 6 | ||||
-rw-r--r-- | module/web/templates/default/settings.html | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py index 7a6baffd8..36ecf22aa 100644 --- a/module/web/json_app.py +++ b/module/web/json_app.py @@ -400,6 +400,8 @@ def update_accounts(): PYLOAD.update_account(plugin, user, value) elif action == "time" and value and "-" in value: PYLOAD.update_account(plugin, user, options={"time": [value]}) + elif action == "limitdl" and value and value.isdigit(): + PYLOAD.update_account(plugin, user, options={"limitDL": [value]}) elif action == "delete" and value: PYLOAD.remove_account(plugin, user) @@ -463,4 +465,4 @@ def make_dir(): return {"response": "success", "path": path, "name": name} except: - return HTTPError()
\ No newline at end of file + return HTTPError() diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 784127f72..c7af88275 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -316,6 +316,10 @@ def config(): data["time"] = data["options"]["time"][0] except: data["time"] = "0:00-0:00" + if data["options"].has_key("limitDL"): + data["limitdl"] = data["options"]["limitDL"][0] + else: + data["limitdl"] = "0" return render_to_response('settings.html', {'conf': {'plugin': plugin_menu, 'general': conf_menu, 'accs': accs}}, @@ -600,4 +604,4 @@ def info(): "webif": conf["webinterface"]["port"]["value"], "language": conf["general"]["language"]["value"]} - return render_to_response("info.html", data, [pre_processor])
\ No newline at end of file + return render_to_response("info.html", data, [pre_processor]) diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html index fc33ca64a..776089c47 100644 --- a/module/web/templates/default/settings.html +++ b/module/web/templates/default/settings.html @@ -126,6 +126,7 @@ <th>{{ _("Valid until") }}</th> <th>{{ _("Traffic left") }}</th> <th>{{ _("Time") }}</th> + <th>{{ _("Max Parallel") }}</th> <th>{{ _("Delete?") }}</th> </tr> </thead> @@ -182,6 +183,11 @@ size="7" value="{{account.time}}"/> </td> <td> + <input id="{{plugin}}|limitdl;{{account.login}}" + name="{{plugin}}|limitdl;{{account.login}}" type="text" + size="2" value="{{account.limitdl}}"/> + </td> + <td> <input id="{{plugin}}|delete;{{account.login}}" name="{{plugin}}|delete;{{account.login}}" type="checkbox" value="True"/> |