mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-22 16:19:53 +05:30
Add error page and give video.ecr more detailed video info
This commit is contained in:
parent
a0d34367bc
commit
266ec3fa03
1
src/views/error.ecr
Normal file
1
src/views/error.ecr
Normal file
@ -0,0 +1 @@
|
||||
<%= error_message %>
|
@ -1,24 +1,28 @@
|
||||
<title><%= video_info["title"] %> - Invidious</title>
|
||||
<video style="width: 100%" poster="<%= video_info.has_key?("iurlhq720") ? video_info["iurlhq720"] : video_info["iurlmq"] %>" controls>
|
||||
<% fmt_stream.each do |fmt| %>
|
||||
<% fmt_stream.each do |fmt| %>
|
||||
<source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>">
|
||||
<% end %>
|
||||
</video>
|
||||
<h1><%= video_info["title"] %></h1>
|
||||
<div class="pure-g">
|
||||
<% end %>
|
||||
</video>
|
||||
<h1><%= video_info["title"] %></h1>
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<p>+ <%= likes %></p>
|
||||
<p>- <%= dislikes %></p>
|
||||
<p><i class="fa fa-eye" aria-hidden="true"></i> <%= video_record.views %></p>
|
||||
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= video_record.likes %></p>
|
||||
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= video_record.dislikes %></p>
|
||||
<p>Wilson Score : <%= ci_lower_bound(video_record.likes, video_record.likes + video_record.dislikes).round(4) %></p>
|
||||
<p>Rating : <%= video_record.rating.round(4) %> / 5</p>
|
||||
<!-- <p>Calculated Rating : <%= calculated_rating.round(4) %> / 5</p> -->
|
||||
<p>Engagement : <%= engagement.round(2) %>%</p>
|
||||
<p>Earnings : <%= video_info.has_key?("allowed_ads") ? "~$" + ((video_record.views.to_f / 500).round(2)).to_s : "Unmonetized" %></p>
|
||||
<p>Allowed ads : <br><%= video_info.has_key?("allowed_ads") ? video_info["allowed_ads"] : "Unmonetized" %></p>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-3-5">
|
||||
<p>Views : <%= views %></p>
|
||||
<p>Rating : <%= rating %></p>
|
||||
<p>Calculated Rating : <%= calculated_rating %></p>
|
||||
<p>Engagement : <%= engagement %>%</p>
|
||||
<p><%= video_record.description %></p>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-5">
|
||||
<% fmt_stream.each do |fmt| %>
|
||||
<p><%= fmt["quality"] %></p>
|
||||
<% related_videos.each do |video| %>
|
||||
<p><a href="<%= video.content %>"><%= video.content %></a></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user