Proxify formatStreams URLs too
This commit is contained in:
parent
e319c35f09
commit
c606465708
1 changed files with 7 additions and 1 deletions
|
@ -162,7 +162,13 @@ module Invidious::JSONify::APIv1
|
||||||
json.array do
|
json.array do
|
||||||
video.fmt_stream.each do |fmt|
|
video.fmt_stream.each do |fmt|
|
||||||
json.object do
|
json.object do
|
||||||
json.field "url", fmt["url"]
|
if proxy
|
||||||
|
json.field "url", Invidious::HttpServer::Utils.proxy_video_url(
|
||||||
|
fmt["url"].to_s, absolute: true
|
||||||
|
)
|
||||||
|
else
|
||||||
|
json.field "url", fmt["url"]
|
||||||
|
end
|
||||||
json.field "itag", fmt["itag"].as_i.to_s
|
json.field "itag", fmt["itag"].as_i.to_s
|
||||||
json.field "type", fmt["mimeType"]
|
json.field "type", fmt["mimeType"]
|
||||||
json.field "quality", fmt["quality"]
|
json.field "quality", fmt["quality"]
|
||||||
|
|
Loading…
Reference in a new issue