|
|
@ -54,29 +54,29 @@
|
|
|
|
<div class="h-box">
|
|
|
|
<div class="h-box">
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch video on Youtube") %></a></p>
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=<%= video.id %>"><%= translate(locale, "Watch video on Youtube") %></a></p>
|
|
|
|
|
|
|
|
|
|
|
|
<form class="pure-form pure-form-stacked">
|
|
|
|
<form class="pure-form pure-form-stacked" action="/latest_version" method="get" rel="noopener" target="_blank">
|
|
|
|
<div class="pure-control-group">
|
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="download_widget"><%= translate(locale, "Download as: ") %></label>
|
|
|
|
<label for="download_widget"><%= translate(locale, "Download as: ") %></label>
|
|
|
|
<select style="width:100%" name="download_widget" id="download_widget">
|
|
|
|
<select style="width:100%" name="download_widget" id="download_widget">
|
|
|
|
<% video_streams.each do |option| %>
|
|
|
|
<% video_streams.each do |option| %>
|
|
|
|
<option data-url="/latest_version?id=<%= video.id %>&itag=<%= option["itag"] %>&local=true"><%= option["quality_label"] %> - <%= option["type"].split(";")[0] %> @ <%= option["fps"] %>fps - video only</option>
|
|
|
|
<option value='{"id":"<%= video.id %>","itag":"<%= option["itag"] %>","title":"<%= video.title.dump_unquoted %>-<%= video.id %>.mp4"}'>
|
|
|
|
|
|
|
|
<%= option["quality_label"] %> - <%= option["type"].split(";")[0] %> @ <%= option["fps"] %>fps - video only
|
|
|
|
|
|
|
|
</option>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% audio_streams.each do |option| %>
|
|
|
|
<% audio_streams.each do |option| %>
|
|
|
|
<option data-url="/latest_version?id=<%= video.id %>&itag=<%= option["itag"] %>&local=true"><%= option["type"].split(";")[0] %> @ <%= option["bitrate"] %>k - audio only</option>
|
|
|
|
<option value='{"id":"<%= video.id %>","itag":"<%= option["itag"] %>","title":"<%= video.title.dump_unquoted %>-<%= video.id %>.mp4"}'>
|
|
|
|
|
|
|
|
<%= option["type"].split(";")[0] %> @ <%= option["bitrate"] %>k - audio only
|
|
|
|
|
|
|
|
</option>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% fmt_stream.each do |option| %>
|
|
|
|
<% fmt_stream.each do |option| %>
|
|
|
|
<option data-url="/latest_version?id=<%= video.id %>&itag=<%= option["itag"] %>&local=true"><%= itag_to_metadata?(option["itag"]).try &.["height"]? || "~240" %>p - <%= option["type"].split(";")[0] %></option>
|
|
|
|
<option value='{"id":"<%= video.id %>","itag":"<%= option["itag"] %>","title":"<%= video.title.dump_unquoted %>-<%= video.id %>.mp4"}'>
|
|
|
|
|
|
|
|
<%= itag_to_metadata?(option["itag"]).try &.["height"]? || "~240" %>p - <%= option["type"].split(";")[0] %>
|
|
|
|
|
|
|
|
</option>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="progress-container" style="width:100%; display:none">
|
|
|
|
<button type="submit" class="pure-button pure-button-primary">
|
|
|
|
<div id="download-progress">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button type="button" data-title="<%= video.title.dump_unquoted %>-<%= video.id %>.mp4" onclick="download_video(this)"
|
|
|
|
|
|
|
|
class="pure-button pure-button-primary">
|
|
|
|
|
|
|
|
<b><%= translate(locale, "Download") %></b>
|
|
|
|
<b><%= translate(locale, "Download") %></b>
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|