Switch to unified view

a/webui.py b/webui.py
...
...
353
    qs = query_to_recoll_string(query)
353
    qs = query_to_recoll_string(query)
354
    bottle.response.headers['Content-Type'] = 'application/json'
354
    bottle.response.headers['Content-Type'] = 'application/json'
355
    bottle.response.headers['Content-Disposition'] = 'attachment; filename=recoll-%s.json' % normalise_filename(qs)
355
    bottle.response.headers['Content-Disposition'] = 'attachment; filename=recoll-%s.json' % normalise_filename(qs)
356
    res, nres, timer = recoll_search(query)
356
    res, nres, timer = recoll_search(query)
357
357
358
    if py3k:
359
        ures = []
360
        for d in res:
361
            ud={}
362
            for f,v in d.items():
363
                ud[f] = v.decode('utf-8')
364
            ures.append(ud)
365
        res = ures
358
    return json.dumps({ 'query': query, 'results': res })
366
    return json.dumps({ 'query': query, 'results': res })
359
#}}}
367
#}}}
360
#{{{ csv
368
#{{{ csv
361
@bottle.route('/csv')
369
@bottle.route('/csv')
362
def get_csv():
370
def get_csv():