mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-14 06:10:35 +05:30
Fix invalid passing of arguments to get_video
This commit is contained in:
parent
3418b82dc5
commit
27488a2295
@ -268,7 +268,7 @@ get "/watch" do |env|
|
|||||||
env.params.query.delete_all("listen")
|
env.params.query.delete_all("listen")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
video = get_video(id, PG_DB, proxies, params[:region])
|
video = get_video(id, PG_DB, proxies, region: params[:region])
|
||||||
rescue ex : VideoRedirect
|
rescue ex : VideoRedirect
|
||||||
next env.redirect "/watch?v=#{ex.message}"
|
next env.redirect "/watch?v=#{ex.message}"
|
||||||
rescue ex
|
rescue ex
|
||||||
@ -409,7 +409,7 @@ get "/embed/:id" do |env|
|
|||||||
params = process_video_params(env.params.query, nil)
|
params = process_video_params(env.params.query, nil)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
video = get_video(id, PG_DB, proxies, params[:region])
|
video = get_video(id, PG_DB, proxies, region: params[:region])
|
||||||
rescue ex : VideoRedirect
|
rescue ex : VideoRedirect
|
||||||
next env.redirect "/embed/#{ex.message}"
|
next env.redirect "/embed/#{ex.message}"
|
||||||
rescue ex
|
rescue ex
|
||||||
@ -1987,7 +1987,7 @@ get "/api/v1/captions/:id" do |env|
|
|||||||
|
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
begin
|
begin
|
||||||
video = get_video(id, PG_DB, proxies, region)
|
video = get_video(id, PG_DB, proxies, region: region)
|
||||||
rescue ex : VideoRedirect
|
rescue ex : VideoRedirect
|
||||||
next env.redirect "/api/v1/captions/#{ex.message}"
|
next env.redirect "/api/v1/captions/#{ex.message}"
|
||||||
rescue ex
|
rescue ex
|
||||||
@ -2219,7 +2219,7 @@ get "/api/v1/videos/:id" do |env|
|
|||||||
region = env.params.query["region"]?
|
region = env.params.query["region"]?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
video = get_video(id, PG_DB, proxies, region)
|
video = get_video(id, PG_DB, proxies, region: region)
|
||||||
rescue ex : VideoRedirect
|
rescue ex : VideoRedirect
|
||||||
next env.redirect "/api/v1/videos/#{ex.message}"
|
next env.redirect "/api/v1/videos/#{ex.message}"
|
||||||
rescue ex
|
rescue ex
|
||||||
@ -3105,7 +3105,7 @@ get "/api/manifest/dash/id/:id" do |env|
|
|||||||
|
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
begin
|
begin
|
||||||
video = get_video(id, PG_DB, proxies, region)
|
video = get_video(id, PG_DB, proxies, region: region)
|
||||||
rescue ex : VideoRedirect
|
rescue ex : VideoRedirect
|
||||||
next env.redirect "/api/manifest/dash/id/#{ex.message}"
|
next env.redirect "/api/manifest/dash/id/#{ex.message}"
|
||||||
rescue ex
|
rescue ex
|
||||||
|
Loading…
Reference in New Issue
Block a user