Invidious is an alternative front-end to YouTube
Add fix for empty 'page' param
Omar Rothd201733756bc
diff --git a/src/invidious.cr b/src/invidious.crindex 16a2d458..1a739ae4 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -1139,7 +1139,7 @@ endget "/api/v1/channels/:ucid/videos" do |env|ucid = env.params.url["ucid"]- page = env.params.query["page"]?+ page = env.params.query["page"]?.try &.to_i?page ||= 1url = produce_videos_url(ucid, page)@@ -1346,7 +1346,7 @@ get "/search" do |env|next env.redirect "/"end- page = env.params.query["page"]?.try &.to_i+ page = env.params.query["page"]?.try &.to_i?page ||= 1client = make_client(YT_URL)@@ -1794,7 +1794,7 @@ get "/feed/subscriptions" do |env|max_results ||= env.params.query["max_results"]?.try &.to_imax_results ||= 40- page = env.params.query["page"]?.try &.to_i+ page = env.params.query["page"]?.try &.to_i?page ||= 1if max_results < 0@@ -1966,7 +1966,7 @@ get "/feed/private" do |env|max_results = env.params.query["max_results"]?.try &.to_imax_results ||= 40- page = env.params.query["page"]?.try &.to_i+ page = env.params.query["page"]?.try &.to_i?page ||= 1if max_results < 0@@ -2226,7 +2226,7 @@ get "/channel/:ucid" do |env|ucid = env.params.url["ucid"]- page = env.params.query["page"]?.try &.to_i+ page = env.params.query["page"]?.try &.to_i?page ||= 1client = make_client(YT_URL)