mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add caption URL to video info
This commit is contained in:
parent
4c8bb3b293
commit
c166f46b7c
1 changed files with 2 additions and 0 deletions
|
@ -1794,6 +1794,7 @@ get "/api/v1/captions/:id" do |env|
|
|||
json.object do
|
||||
json.field "label", caption.name.simpleText
|
||||
json.field "languageCode", caption.languageCode
|
||||
json.field "url", "/api/v1/captions/#{id}?label=#{URI.escape(caption.name.simpleText)}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -2354,6 +2355,7 @@ get "/api/v1/videos/:id" do |env|
|
|||
json.object do
|
||||
json.field "label", caption.name.simpleText
|
||||
json.field "languageCode", caption.languageCode
|
||||
json.field "url", "/api/v1/captions/#{id}?label=#{URI.escape(caption.name.simpleText)}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue