mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add 'host' to '/videoplayback'
This commit is contained in:
parent
11ff40bcd6
commit
f01152eda1
2 changed files with 11 additions and 3 deletions
|
@ -4217,9 +4217,15 @@ end
|
|||
get "/videoplayback" do |env|
|
||||
query_params = env.params.query
|
||||
|
||||
fvip = query_params["fvip"]? || "3"
|
||||
mn = query_params["mn"].split(",").pop
|
||||
host = "https://r#{fvip}---#{mn}.googlevideo.com"
|
||||
if query_params["host"]? && !query_params["host"].empty?
|
||||
pp query_params["host"]
|
||||
host = "https://#{query_params["host"]}"
|
||||
else
|
||||
fvip = query_params["fvip"]? || "3"
|
||||
mn = query_params["mn"].split(",").pop
|
||||
host = "https://r#{fvip}---#{mn}.googlevideo.com"
|
||||
end
|
||||
|
||||
url = "/videoplayback?#{query_params.to_s}"
|
||||
|
||||
headers = HTTP::Headers.new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue