summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-01 13:10:51 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-01 13:10:51 +0200
commitaf6cf761c6d873648fa0ffdb4cc9f2f1a032dd3d (patch)
tree518e26cd3f11299ab3dd6755ae5a877216a24ee9 /module/web
parentwebif config fix (diff)
downloadpyload-af6cf761c6d873648fa0ffdb4cc9f2f1a032dd3d.tar.xz
some fixes
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload/views.py10
-rw-r--r--module/web/templates/default/settings.html4
2 files changed, 10 insertions, 4 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index a97cfbfd7..e6428d146 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -187,8 +187,8 @@ def config(request):
try:
if str(conf[skey][okey]['value']) != value:
settings.PYLOAD.set_conf_val(skey, okey, value)
- except:
- errors.append("%s | %s" % (skey, okey))
+ except Exception, e:
+ errors.append("%s | %s : %s" % (skey, okey, e))
else:
continue
else:
@@ -205,5 +205,11 @@ def config(request):
return render_to_response(join(settings.TEMPLATE, 'settings.html'), RequestContext(request, {'conf': {}, 'errors': messages}, [status_proc]))
+ for section in conf.itervalues():
+ for key, option in section.iteritems():
+ if key == "desc": continue
+
+ if ";" in option["typ"]:
+ option["list"] = option["typ"].split(";")
return render_to_response(join(settings.TEMPLATE, 'settings.html'), RequestContext(request, {'conf': conf, 'messages': []}, [status_proc]))
diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html
index 36563b086..07c87a936 100644
--- a/module/web/templates/default/settings.html
+++ b/module/web/templates/default/settings.html
@@ -49,9 +49,9 @@
<option {% if not option.value %} selected="selected" {% endif %}value="False">{% trans "off" %}</option>
</select>
{% else %}
- {% if option.input %}
+ {% if ";" in option.typ %}
<select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}">
- {% for entry in option.input %}
+ {% for entry in option.list %}
<option {% ifequal option.value entry %} selected="selected" {% endifequal %}>{{entry}}</option>
{% endfor %}
</select>