From c166f46b7c6dc162e6804a66999fd915d8bf60c6 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 19 Sep 2018 14:08:59 -0500 Subject: [PATCH] Add caption URL to video info --- src/invidious.cr | 2 ++ 1 file changed, 2 insertions(+) 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