mirror of https://github.com/iv-org/invidious.git
Fix named arg syntax when passing force_resolve
This commit is contained in:
parent
1ae14cc224
commit
c24ed85110
|
@ -42,7 +42,7 @@ module Invidious::Routes::VideoPlayback
|
|||
headers["Range"] = "bytes=#{range_for_head}"
|
||||
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)
|
||||
error = ""
|
||||
5.times do
|
||||
|
@ -57,7 +57,7 @@ module Invidious::Routes::VideoPlayback
|
|||
if new_host != host
|
||||
host = new_host
|
||||
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
|
||||
|
||||
url = "#{location.request_target}&host=#{location.host}#{region ? "®ion=#{region}" : ""}"
|
||||
|
@ -71,7 +71,7 @@ module Invidious::Routes::VideoPlayback
|
|||
fvip = "3"
|
||||
|
||||
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
|
||||
error = ex.message
|
||||
end
|
||||
|
@ -196,7 +196,7 @@ module Invidious::Routes::VideoPlayback
|
|||
break
|
||||
else
|
||||
client.close
|
||||
client = make_client(URI.parse(host), region, force_resolve = true)
|
||||
client = make_client(URI.parse(host), region, force_resolve: true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ def make_client(url : URI, region = nil, force_resolve : Bool = false)
|
|||
end
|
||||
|
||||
def make_client(url : URI, region = nil, force_resolve : Bool = false, &block)
|
||||
client = make_client(url, region, force_resolve)
|
||||
client = make_client(url, region, force_resolve: force_resolve)
|
||||
begin
|
||||
yield client
|
||||
ensure
|
||||
|
|
Loading…
Reference in New Issue