mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 13:42:27 +05:30
Merge e569aaed9d
into c5fdd9ea65
This commit is contained in:
commit
29baf4ad8d
@ -10,8 +10,12 @@ module Invidious::Routes::API::V1::Videos
|
||||
region = env.params.query["region"]?
|
||||
proxy = {"1", "true"}.any? &.== env.params.query["local"]?
|
||||
|
||||
refresh = env.params.query["refresh"]?
|
||||
refresh ||= "1"
|
||||
refresh = refresh == "1" || refresh == "true"
|
||||
|
||||
begin
|
||||
video = get_video(id, region: region)
|
||||
video = get_video(id, refresh: refresh, region: region)
|
||||
rescue ex : NotFoundException
|
||||
return error_json(404, ex)
|
||||
rescue ex
|
||||
|
Loading…
Reference in New Issue
Block a user