mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add region
to latest_version
This commit is contained in:
parent
0d509c82ee
commit
27934dad37
1 changed files with 3 additions and 1 deletions
|
@ -3662,6 +3662,8 @@ get "/latest_version" do |env|
|
||||||
id = env.params.query["id"]?
|
id = env.params.query["id"]?
|
||||||
itag = env.params.query["itag"]?
|
itag = env.params.query["itag"]?
|
||||||
|
|
||||||
|
region = env.params.query["region"]?
|
||||||
|
|
||||||
local = env.params.query["local"]?
|
local = env.params.query["local"]?
|
||||||
local ||= "false"
|
local ||= "false"
|
||||||
local = local == "true"
|
local = local == "true"
|
||||||
|
@ -3670,7 +3672,7 @@ get "/latest_version" do |env|
|
||||||
halt env, status_code: 400
|
halt env, status_code: 400
|
||||||
end
|
end
|
||||||
|
|
||||||
video = get_video(id, PG_DB, proxies)
|
video = get_video(id, PG_DB, proxies, region: region)
|
||||||
|
|
||||||
fmt_stream = video.fmt_stream(decrypt_function)
|
fmt_stream = video.fmt_stream(decrypt_function)
|
||||||
adaptive_fmts = video.adaptive_fmts(decrypt_function)
|
adaptive_fmts = video.adaptive_fmts(decrypt_function)
|
||||||
|
|
Loading…
Reference in a new issue