From bbfbe709308b24a326d099dcc669b2445ecf9a2b Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 8 May 2021 04:54:12 -0700 Subject: [PATCH] Move continuation_token out of Category struct --- src/invidious/routes/channels.cr | 6 +++--- src/invidious/views/channel/featured_channels.ecr | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index b64fb7a8..2e6a1b40 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -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 diff --git a/src/invidious/views/channel/featured_channels.ecr b/src/invidious/views/channel/featured_channels.ecr index a936a01a..2aafa14f 100644 --- a/src/invidious/views/channel/featured_channels.ecr +++ b/src/invidious/views/channel/featured_channels.ecr @@ -106,7 +106,7 @@
- <% if (next_cont_token = featured_channel_categories[0].continuation_token) %> + <% if (next_cont_token = continuation_token) %> <% previous = ""%> <% if continuation %> <% previous = "&previous=#{HTML.escape(continuation)}"%>