This commit is contained in:
Brahim Hadriche 2024-08-25 11:59:39 -04:00 committed by GitHub
commit 29baf4ad8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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