aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/channel.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2021-03-02 19:32:56 -0800
committerJesús <heckyel@hyperbola.info>2021-03-03 10:40:55 -0500
commit1532a48ef440079efb43cb4a4c6ad3043fecd2a3 (patch)
tree22e4aa6cc6581b54a77ad2115548913badee6ac8 /youtube/channel.py
parent2df42389246bd731e04bd2e2472a05d27917b981 (diff)
downloadyt-local-1532a48ef440079efb43cb4a4c6ad3043fecd2a3.tar.lz
yt-local-1532a48ef440079efb43cb4a4c6ad3043fecd2a3.tar.xz
yt-local-1532a48ef440079efb43cb4a4c6ad3043fecd2a3.zip
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>
Diffstat (limited to 'youtube/channel.py')
-rw-r--r--youtube/channel.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/channel.py b/youtube/channel.py
index d60f1d3..a182320 100644
--- a/youtube/channel.py
+++ b/youtube/channel.py
@@ -237,8 +237,9 @@ def get_channel_page_general_url(base_url, tab, request, channel_id=None):
view = request.args.get('view', '1')
query = request.args.get('query', '')
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 = (
gevent.spawn(get_number_of_videos_channel, channel_id),
gevent.spawn(get_channel_tab, channel_id, page_number, sort,