diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-09-19 14:08:59 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-09-19 14:08:59 -0500 |
| commit | c166f46b7c6dc162e6804a66999fd915d8bf60c6 (patch) | |
| tree | c50d14b183b7536a21035fff38f8245ce698a10e /src/invidious.cr | |
| parent | 4c8bb3b293c5742a9244d306f669bb1b824ee3ba (diff) | |
| download | invidious-c166f46b7c6dc162e6804a66999fd915d8bf60c6.tar.gz invidious-c166f46b7c6dc162e6804a66999fd915d8bf60c6.tar.bz2 invidious-c166f46b7c6dc162e6804a66999fd915d8bf60c6.zip | |
Add caption URL to video info
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index dd36dfeb..1d0a8238 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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 |
