Add debug info to videoplayback
This commit is contained in:
parent
bd0aaa343b
commit
d96dee3aa6
@ -5482,8 +5482,8 @@ get "/videoplayback" do |env|
|
|||||||
end
|
end
|
||||||
|
|
||||||
client = make_client(URI.parse(host), region)
|
client = make_client(URI.parse(host), region)
|
||||||
|
|
||||||
response = HTTP::Client::Response.new(500)
|
response = HTTP::Client::Response.new(500)
|
||||||
|
error = ""
|
||||||
5.times do
|
5.times do
|
||||||
begin
|
begin
|
||||||
response = client.head(url, headers)
|
response = client.head(url, headers)
|
||||||
@ -5508,12 +5508,14 @@ get "/videoplayback" do |env|
|
|||||||
host = "https://r#{fvip}---#{mn}.googlevideo.com"
|
host = "https://r#{fvip}---#{mn}.googlevideo.com"
|
||||||
client = make_client(URI.parse(host), region)
|
client = make_client(URI.parse(host), region)
|
||||||
rescue ex
|
rescue ex
|
||||||
|
error = ex.message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if response.status_code >= 400
|
if response.status_code >= 400
|
||||||
env.response.status_code = response.status_code
|
env.response.status_code = response.status_code
|
||||||
next
|
env.response.content_type = "text/plain"
|
||||||
|
next error
|
||||||
end
|
end
|
||||||
|
|
||||||
if url.includes? "&file=seg.ts"
|
if url.includes? "&file=seg.ts"
|
||||||
|
Loading…
Reference in New Issue
Block a user