|
a/webui.py |
|
b/webui.py |
|
... |
|
... |
340 |
|
340 |
|
341 |
@bottle.route('/set')
|
341 |
@bottle.route('/set')
|
342 |
def set():
|
342 |
def set():
|
343 |
config = get_config()
|
343 |
config = get_config()
|
344 |
for k, v in DEFAULTS.items():
|
344 |
for k, v in DEFAULTS.items():
|
345 |
bottle.response.set_cookie(k, str(bottle.request.query.get(k)), max_age=3153600000)
|
345 |
bottle.response.set_cookie(k, str(bottle.request.query.get(k)), max_age=3153600000, expires=3153600000)
|
346 |
for d in config['dirs']:
|
346 |
for d in config['dirs']:
|
347 |
cookie_name = 'mount_%s' % urllib.quote(d, '')
|
347 |
cookie_name = 'mount_%s' % urllib.quote(d, '')
|
348 |
bottle.response.set_cookie(cookie_name, str(bottle.request.query.get('mount_%s' % d)), max_age=3153600000)
|
348 |
bottle.response.set_cookie(cookie_name, str(bottle.request.query.get('mount_%s' % d)), max_age=3153600000, expires=3153600000)
|
349 |
bottle.redirect('./')
|
349 |
bottle.redirect('./')
|
350 |
#}}}
|
350 |
#}}}
|
351 |
#{{{ osd
|
351 |
#{{{ osd
|
352 |
@bottle.route('/osd.xml')
|
352 |
@bottle.route('/osd.xml')
|
353 |
@bottle.view('osd')
|
353 |
@bottle.view('osd')
|