Invidious is an alternative front-end to YouTube
frontend: remove paging on channel videos
Samantaz Fox9588fcb5d1dd
diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.crindex c6e02cbd..f26f29f5 100644--- a/src/invidious/routes/channels.cr+++ b/src/invidious/routes/channels.cr@@ -12,9 +12,6 @@ module Invidious::Routes::Channelsendlocale, user, subscriptions, continuation, ucid, channel = data- page = env.params.query["page"]?.try &.to_i?- page ||= 1-sort_by = env.params.query["sort_by"]?.try &.downcaseif channel.auto_generated@@ -35,7 +32,7 @@ module Invidious::Routes::Channelssort_options = {"newest", "oldest", "popular"}sort_by ||= "newest"- count, items = get_60_videos(channel.ucid, channel.author, page, channel.auto_generated, sort_by)+ count, items = get_60_videos(channel.ucid, channel.author, 1, channel.auto_generated, sort_by)endtemplated "channel"diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecrindex dea86abe..878587d4 100644--- a/src/invidious/views/channel.ecr+++ b/src/invidious/views/channel.ecr@@ -90,7 +90,7 @@<% if sort_by == sort %><b><%= translate(locale, sort) %></b><% else %>- <a href="/channel/<%= ucid %>?page=<%= page %>&sort_by=<%= sort %>">+ <a href="/channel/<%= ucid %>?sort_by=<%= sort %>"><%= translate(locale, sort) %></a><% end %>@@ -111,19 +111,7 @@</div><div class="pure-g h-box">- <div class="pure-u-1 pure-u-lg-1-5">- <% if page > 1 %>- <a href="/channel/<%= ucid %>?page=<%= page - 1 %><% if sort_by != "newest" %>&sort_by=<%= URI.encode_www_form(sort_by) %><% end %>">- <%= translate(locale, "Previous page") %>- </a>- <% end %>- </div>+ <div class="pure-u-1 pure-u-lg-1-5"></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 count == 60 %>- <a href="/channel/<%= ucid %>?page=<%= page + 1 %><% if sort_by != "newest" %>&sort_by=<%= URI.encode_www_form(sort_by) %><% end %>">- <%= translate(locale, "Next page") %>- </a>- <% end %>- </div>+ <div class="pure-u-1 pure-u-lg-1-5"></div></div>