Add subtitles to download widget

This commit is contained in:
Omar Roth 2019-04-11 12:08:43 -05:00
parent 611555514c
commit 5e141e869d
2 changed files with 18 additions and 1 deletions

View file

@ -79,6 +79,11 @@
<%= itag_to_metadata?(option["itag"]).try &.["height"]? || "~240" %>p - <%= option["type"].split(";")[0] %>
</option>
<% end %>
<% captions.each do |caption| %>
<option value='{"id":"<%= video.id %>","label":"<%= caption.name.simpleText %>","title":"<%= URI.escape(video.title) %>-<%= video.id %>.<%= caption.languageCode %>.vtt"}'>
<%= translate(locale, "Subtitles - `x` (.vtt)", caption.name.simpleText) %>
</option>
<% end %>
</select>
</div>