Move continuation_token out of Category struct

This commit is contained in:
syeopite 2021-05-08 04:54:12 -07:00
parent 0863d83574
commit bbfbe70930
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82
2 changed files with 4 additions and 4 deletions

View file

@ -114,7 +114,7 @@ module Invidious::Routes::Channels
# Previous continuation
previous_continuation = env.params.query["previous"]?
featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil, continuation, current_category_title).not_nil!
featured_channel_categories, continuation_token = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil, continuation, current_category_title).not_nil!
elsif view && shelf_id
offset = env.params.query["offset"]?
if offset
@ -123,12 +123,12 @@ module Invidious::Routes::Channels
offset = 0
end
featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], view, shelf_id, continuation, current_category_title).not_nil!
featured_channel_categories, continuation_token = fetch_channel_featured_channels(ucid, channel.tabs["channels"], view, shelf_id, continuation, current_category_title).not_nil!
else
previous_continuation = nil
offset = 0
featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil, current_category_title).not_nil!
featured_channel_categories, continuation_token = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil, current_category_title).not_nil!
end
templated "channel/featured_channels", buffer_footer: true

View file

@ -106,7 +106,7 @@
</div>
<div class="pure-u-1 pure-u-lg-3-5"></div>
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
<% if (next_cont_token = featured_channel_categories[0].continuation_token) %>
<% if (next_cont_token = continuation_token) %>
<% previous = ""%>
<% if continuation %>
<% previous = "&previous=#{HTML.escape(continuation)}"%>