diff options
| author | Omar Roth <omarroth@hotmail.com> | 2017-12-30 15:30:21 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2017-12-30 15:35:48 -0600 |
| commit | 266ec3fa03b251b126420282487e2ebde97c1e71 (patch) | |
| tree | 22446399be038c192e54c7aa034f6784733b1249 /src | |
| parent | a0d34367bc3007a18871df67653af83dd773eba1 (diff) | |
| download | invidious-266ec3fa03b251b126420282487e2ebde97c1e71.tar.gz invidious-266ec3fa03b251b126420282487e2ebde97c1e71.tar.bz2 invidious-266ec3fa03b251b126420282487e2ebde97c1e71.zip | |
Add error page and give video.ecr more detailed video info
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/error.ecr | 1 | ||||
| -rw-r--r-- | src/views/watch.ecr | 42 |
2 files changed, 24 insertions, 19 deletions
diff --git a/src/views/error.ecr b/src/views/error.ecr new file mode 100644 index 00000000..8431acb4 --- /dev/null +++ b/src/views/error.ecr @@ -0,0 +1 @@ +<%= error_message %>
\ No newline at end of file diff --git a/src/views/watch.ecr b/src/views/watch.ecr index 05101806..30aa9a61 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -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| %> - <source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>"> -<% 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> - </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> - </div> - <div class="pure-u-1 pure-u-md-1-5"> <% fmt_stream.each do |fmt| %> - <p><%= fmt["quality"] %></p> - <% end %> + <source src="<%= fmt["url"] %>" type="<%= fmt["type"].split(";")[0] %>"> + <% end %> + </video> + <h1><%= video_info["title"] %></h1> + <div class="pure-g"> + <div class="pure-u-1 pure-u-md-1-5"> + <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><%= video_record.description %></p> + </div> + <div class="pure-u-1 pure-u-md-1-5"> + <% related_videos.each do |video| %> + <p><a href="<%= video.content %>"><%= video.content %></a></p> + <% end %> </div> </div>
\ No newline at end of file |
