aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/channel.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2021-03-05 23:27:31 -0800
committerJesús <heckyel@hyperbola.info>2021-03-15 22:22:15 -0500
commite549b5f67c4beff421a2b2b36f3b5031bfe8ed88 (patch)
treea4377a1e3817b6d466730d2a5059ffb3dc0688d5 /youtube/channel.py
parentb2c1066734b59f69666a3cfc0f82ed9718685d4b (diff)
downloadyt-local-e549b5f67c4beff421a2b2b36f3b5031bfe8ed88.tar.lz
yt-local-e549b5f67c4beff421a2b2b36f3b5031bfe8ed88.tar.xz
yt-local-e549b5f67c4beff421a2b2b36f3b5031bfe8ed88.zip
Channel: Allow going to next pages of playlists page
Uses previous and next buttons. Now can view more than just first page of playlists page Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/channel.py')
-rw-r--r--youtube/channel.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube/channel.py b/youtube/channel.py
index 00e1cf9..69092d3 100644
--- a/youtube/channel.py
+++ b/youtube/channel.py
@@ -280,8 +280,11 @@ def get_channel_page_general_url(base_url, tab, request, channel_id=None):
number_of_videos, polymer_json = tasks[0].value, tasks[1].value
elif tab == 'about':
polymer_json = util.fetch_url(base_url + '/about?pbj=1', headers_desktop, debug_name='gen_channel_about')
- elif tab == 'playlists':
+ elif tab == 'playlists' and page_number == 1:
polymer_json = util.fetch_url(base_url+ '/playlists?pbj=1&view=1&sort=' + playlist_sort_codes[sort], headers_desktop, debug_name='gen_channel_playlists')
+ elif tab == 'playlists':
+ polymer_json = get_channel_tab(channel_id, page_number, sort,
+ 'playlists', view)
elif tab == 'search' and channel_id:
polymer_json = get_channel_search_json(channel_id, query, page_number)
elif tab == 'search':
@@ -304,6 +307,7 @@ def get_channel_page_general_url(base_url, tab, request, channel_id=None):
elif tab == 'search':
info['search_box_value'] = query
info['header_playlist_names'] = local_playlist.get_playlist_names()
+ if tab in ('search', 'playlists'):
info['page_number'] = page_number
info['subscribed'] = subscriptions.is_subscribed(info['channel_id'])