From 27488a22950ca7e723cef8c273aebbe3ee3ad4ee Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 18 Nov 2018 17:57:31 -0600 Subject: [PATCH] Fix invalid passing of arguments to get_video --- src/invidious.cr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 69e90fcb5..26d1d0834 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -268,7 +268,7 @@ get "/watch" do |env| env.params.query.delete_all("listen") begin - video = get_video(id, PG_DB, proxies, params[:region]) + video = get_video(id, PG_DB, proxies, region: params[:region]) rescue ex : VideoRedirect next env.redirect "/watch?v=#{ex.message}" rescue ex @@ -409,7 +409,7 @@ get "/embed/:id" do |env| params = process_video_params(env.params.query, nil) begin - video = get_video(id, PG_DB, proxies, params[:region]) + video = get_video(id, PG_DB, proxies, region: params[:region]) rescue ex : VideoRedirect next env.redirect "/embed/#{ex.message}" rescue ex @@ -1987,7 +1987,7 @@ get "/api/v1/captions/:id" do |env| client = make_client(YT_URL) begin - video = get_video(id, PG_DB, proxies, region) + video = get_video(id, PG_DB, proxies, region: region) rescue ex : VideoRedirect next env.redirect "/api/v1/captions/#{ex.message}" rescue ex @@ -2219,7 +2219,7 @@ get "/api/v1/videos/:id" do |env| region = env.params.query["region"]? begin - video = get_video(id, PG_DB, proxies, region) + video = get_video(id, PG_DB, proxies, region: region) rescue ex : VideoRedirect next env.redirect "/api/v1/videos/#{ex.message}" rescue ex @@ -3105,7 +3105,7 @@ get "/api/manifest/dash/id/:id" do |env| client = make_client(YT_URL) begin - video = get_video(id, PG_DB, proxies, region) + video = get_video(id, PG_DB, proxies, region: region) rescue ex : VideoRedirect next env.redirect "/api/manifest/dash/id/#{ex.message}" rescue ex