Use likes, dislikes from record

This commit is contained in:
Omar Roth 2018-01-27 20:10:08 -06:00
parent 236fdb85ff
commit 03de6fbf06

View File

@ -2,7 +2,7 @@
<link rel="stylesheet" href="/css/video-js.css"> <link rel="stylesheet" href="/css/video-js.css">
<script src="/js/video.js"></script> <script src="/js/video.js"></script>
<script src="/js/videojs.hotkeys.min.js"></script> <script src="/js/videojs.hotkeys.min.js"></script>
<title><%= video.info["title"] %> - Invidious</title> <title><%= video.title %> - Invidious</title>
<% end %> <% end %>
<% if listen == "true" %> <% if listen == "true" %>
@ -54,10 +54,10 @@ var player = videojs('player', options, function() {
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1 pure-u-md-1-5"> <div class="pure-u-1 pure-u-md-1-5">
<p><i class="fa fa-eye" aria-hidden="true"></i> <%= views %></p> <p><i class="fa fa-eye" aria-hidden="true"></i> <%= video.views %></p>
<p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= likes %></p> <p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= video.likes %></p>
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= dislikes %></p> <p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= video.dislikes %></p>
<p id="Wilson">Wilson Score : <%= ci_lower_bound(likes, likes + dislikes).round(4) %></p> <p id="Wilson">Wilson Score : <%= video.wilson_score.round(4) %></p>
<p id="Rating">Rating : <%= rating.round(4) %> / 5</p> <p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
<p id="Engagement">Engagement : <%= engagement.round(2) %>%</p> <p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
</div> </div>