Fix colors and data-url in download widget

This commit is contained in:
Omar Roth
2019-01-27 21:20:52 -06:00
parent 6218078c51
commit c0fdc28a84
4 changed files with 20 additions and 9 deletions

View File

@@ -3658,6 +3658,10 @@ get "/latest_version" do |env|
id = env.params.query["id"]?
itag = env.params.query["itag"]?
local = env.params.query["local"]?
local ||= "false"
local = local == "true"
if !id || !itag
halt env, status_code: 400
end
@@ -3674,7 +3678,12 @@ get "/latest_version" do |env|
halt env, status_code: 409
end
env.redirect urls[0]["url"]
url = urls[0]["url"]
if local
url = URI.parse(url).full_path.not_nil!
end
env.redirect url
end
options "/videoplayback" do |env|