Fix regression: Channels not sorting by oldest/popular

get_channel_first_page was mistakenly used when the sorting
or view is different. Must use channel_tab which generates
the necessary ctokens.

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor 2021-03-02 19:32:56 -08:00 committed by Jesús
parent 2df4238924
commit 1532a48ef4
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -237,8 +237,9 @@ def get_channel_page_general_url(base_url, tab, request, channel_id=None):
view = request.args.get('view', '1') view = request.args.get('view', '1')
query = request.args.get('query', '') query = request.args.get('query', '')
ctoken = request.args.get('ctoken', '') ctoken = request.args.get('ctoken', '')
default_params = (page_number == 1 and sort == '3' and view == '1')
if tab == 'videos' and channel_id and page_number > 1: if tab == 'videos' and channel_id and not default_params:
tasks = ( tasks = (
gevent.spawn(get_number_of_videos_channel, channel_id), gevent.spawn(get_number_of_videos_channel, channel_id),
gevent.spawn(get_channel_tab, channel_id, page_number, sort, gevent.spawn(get_channel_tab, channel_id, page_number, sort,