mirror of
https://github.com/iv-org/invidious.git
synced 2025-02-26 01:11:22 -05:00
Merge e569aaed9d3737139cb52fa48c1414918c936560 into 53e8a5d62d4d7d66e8819f221a1c7b168102995c
This commit is contained in:
commit
3a31a5fc3d
@ -10,8 +10,12 @@ module Invidious::Routes::API::V1::Videos
|
|||||||
region = env.params.query["region"]?
|
region = env.params.query["region"]?
|
||||||
proxy = {"1", "true"}.any? &.== env.params.query["local"]?
|
proxy = {"1", "true"}.any? &.== env.params.query["local"]?
|
||||||
|
|
||||||
|
refresh = env.params.query["refresh"]?
|
||||||
|
refresh ||= "1"
|
||||||
|
refresh = refresh == "1" || refresh == "true"
|
||||||
|
|
||||||
begin
|
begin
|
||||||
video = get_video(id, region: region)
|
video = get_video(id, refresh: refresh, region: region)
|
||||||
rescue ex : NotFoundException
|
rescue ex : NotFoundException
|
||||||
return error_json(404, ex)
|
return error_json(404, ex)
|
||||||
rescue ex
|
rescue ex
|
||||||
|
Loading…
x
Reference in New Issue
Block a user