mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-26 08:42:08 +05:30
Fix named arg syntax when passing force_resolve (#4754)
No related issue
This commit is contained in:
commit
4f7a18a630
@ -42,7 +42,7 @@ module Invidious::Routes::VideoPlayback
|
|||||||
headers["Range"] = "bytes=#{range_for_head}"
|
headers["Range"] = "bytes=#{range_for_head}"
|
||||||
end
|
end
|
||||||
|
|
||||||
client = make_client(URI.parse(host), region, force_resolve = true)
|
client = make_client(URI.parse(host), region, force_resolve: true)
|
||||||
response = HTTP::Client::Response.new(500)
|
response = HTTP::Client::Response.new(500)
|
||||||
error = ""
|
error = ""
|
||||||
5.times do
|
5.times do
|
||||||
@ -57,7 +57,7 @@ module Invidious::Routes::VideoPlayback
|
|||||||
if new_host != host
|
if new_host != host
|
||||||
host = new_host
|
host = new_host
|
||||||
client.close
|
client.close
|
||||||
client = make_client(URI.parse(new_host), region, force_resolve = true)
|
client = make_client(URI.parse(new_host), region, force_resolve: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
url = "#{location.request_target}&host=#{location.host}#{region ? "®ion=#{region}" : ""}"
|
url = "#{location.request_target}&host=#{location.host}#{region ? "®ion=#{region}" : ""}"
|
||||||
@ -71,7 +71,7 @@ module Invidious::Routes::VideoPlayback
|
|||||||
fvip = "3"
|
fvip = "3"
|
||||||
|
|
||||||
host = "https://r#{fvip}---#{mn}.googlevideo.com"
|
host = "https://r#{fvip}---#{mn}.googlevideo.com"
|
||||||
client = make_client(URI.parse(host), region, force_resolve = true)
|
client = make_client(URI.parse(host), region, force_resolve: true)
|
||||||
rescue ex
|
rescue ex
|
||||||
error = ex.message
|
error = ex.message
|
||||||
end
|
end
|
||||||
@ -196,7 +196,7 @@ module Invidious::Routes::VideoPlayback
|
|||||||
break
|
break
|
||||||
else
|
else
|
||||||
client.close
|
client.close
|
||||||
client = make_client(URI.parse(host), region, force_resolve = true)
|
client = make_client(URI.parse(host), region, force_resolve: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ def make_client(url : URI, region = nil, force_resolve : Bool = false, force_you
|
|||||||
end
|
end
|
||||||
|
|
||||||
def make_client(url : URI, region = nil, force_resolve : Bool = false, &)
|
def make_client(url : URI, region = nil, force_resolve : Bool = false, &)
|
||||||
client = make_client(url, region, force_resolve)
|
client = make_client(url, region, force_resolve: force_resolve)
|
||||||
begin
|
begin
|
||||||
yield client
|
yield client
|
||||||
ensure
|
ensure
|
||||||
|
Loading…
Reference in New Issue
Block a user