diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-12-17 13:46:29 -0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-12-18 23:25:45 -0500 |
commit | 43679efff5c44c41e7e8c6ca46da145becbe7c03 (patch) | |
tree | 3dc9f9c493064ed5f8c06d6d017d2723ededfefa /youtube/templates/common_elements.html | |
parent | cf7aa4189386a4d4ffd8eb2cc80992fe1603f0c1 (diff) | |
download | yt-local-43679efff5c44c41e7e8c6ca46da145becbe7c03.tar.lz yt-local-43679efff5c44c41e7e8c6ca46da145becbe7c03.tar.xz yt-local-43679efff5c44c41e7e8c6ca46da145becbe7c03.zip |
channel: replace page #s w/ next page button using provided ctoken
Since yt doesn't accept page #'s when sorting by oldest
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/templates/common_elements.html')
-rw-r--r-- | youtube/templates/common_elements.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/youtube/templates/common_elements.html b/youtube/templates/common_elements.html index 9ccafeb..3c36157 100644 --- a/youtube/templates/common_elements.html +++ b/youtube/templates/common_elements.html @@ -112,4 +112,18 @@ {% set _ = parameters_dictionary.__setitem__('page', current_page + 1) %} <a class="page-link next-page" href="{{ url + '?' + parameters_dictionary|urlencode }}">Next page</a> {% endif %} + + {% macro next_previous_ctoken_buttons(prev_ctoken, next_ctoken, url, parameters_dictionary) %} + {% set parameters_dictionary = parameters_dictionary.to_dict() %} + + {% if prev_ctoken %} + {% set _ = parameters_dictionary.__setitem__('ctoken', prev_ctoken) %} + <a class="page-link previous-page" href="{{ url + '?' + parameters_dictionary|urlencode }}">Previous page</a> + {% endif %} + + {% if next_ctoken %} + {% set _ = parameters_dictionary.__setitem__('ctoken', next_ctoken) %} + <a class="page-link next-page" href="{{ url + '?' + parameters_dictionary|urlencode }}">Next page</a> + {% endif %} + {% endmacro %} {% endmacro %} |