Invidious is an alternative front-end to YouTube
Add temporary fix for crystal-lang/crystal#7383
Omar Rothe86eb16d915d
diff --git a/src/invidious.cr b/src/invidious.crindex 3e5c4d5e..4fe018f9 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -4230,7 +4230,7 @@ get "/videoplayback" do |env|url = "/videoplayback?#{query_params.to_s}"headers = HTTP::Headers.new- {"Range", "Accept", "Accept-Encoding"}.each do |header|+ {"Accept", "Accept-Encoding", "Connection", "Range"}.each do |header|if env.request.headers[header]?headers[header] = env.request.headers[header]enddiff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.crindex 075bf84e..1cd40d41 100644--- a/src/invidious/helpers/helpers.cr+++ b/src/invidious/helpers/helpers.cr@@ -75,6 +75,14 @@ class DenyFrame < Kemal::Handlerendend+# Temp fix for https://github.com/crystal-lang/crystal/issues/7383+class HTTP::Client+ private def handle_response(response)+ # close unless response.keep_alive?+ response+ end+end+def rank_videos(db, n)top = [] of {Float64, String}