mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 18:50:01 +00:00
Support legacy arguments in search route
This commit is contained in:
parent
00c768c722
commit
472b78bac1
|
@ -116,15 +116,13 @@ def home(rss):
|
||||||
if flask.request.args.get('page') == 'rss':
|
if flask.request.args.get('page') == 'rss':
|
||||||
rss = True
|
rss = True
|
||||||
|
|
||||||
term = flask.request.args.get('q')
|
term = flask.request.args.get('q', flask.request.args.get('term'))
|
||||||
sort = flask.request.args.get('s')
|
sort = flask.request.args.get('s')
|
||||||
order = flask.request.args.get('o')
|
order = flask.request.args.get('o')
|
||||||
category = flask.request.args.get('c')
|
category = flask.request.args.get('c', flask.request.args.get('cats'))
|
||||||
quality_filter = flask.request.args.get('f')
|
quality_filter = flask.request.args.get('f', flask.request.args.get('filter'))
|
||||||
user_name = flask.request.args.get('u')
|
user_name = flask.request.args.get('u', flask.request.args.get('user'))
|
||||||
page = flask.request.args.get('p')
|
page = flask.request.args.get('p', flask.request.args.get('offset', 1, int), int)
|
||||||
if page:
|
|
||||||
page = int(page)
|
|
||||||
|
|
||||||
per_page = app.config.get('RESULTS_PER_PAGE')
|
per_page = app.config.get('RESULTS_PER_PAGE')
|
||||||
if not per_page:
|
if not per_page:
|
||||||
|
@ -143,7 +141,7 @@ def home(rss):
|
||||||
'order': order or 'desc',
|
'order': order or 'desc',
|
||||||
'category': category or '0_0',
|
'category': category or '0_0',
|
||||||
'quality_filter': quality_filter or '0',
|
'quality_filter': quality_filter or '0',
|
||||||
'page': page or 1,
|
'page': page,
|
||||||
'rss': rss,
|
'rss': rss,
|
||||||
'per_page': per_page
|
'per_page': per_page
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue