From 266ec3fa03b251b126420282487e2ebde97c1e71 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 30 Dec 2017 15:30:21 -0600 Subject: [PATCH] Add error page and give video.ecr more detailed video info --- src/views/error.ecr | 1 + src/views/watch.ecr | 42 +++++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 src/views/error.ecr 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 @@ <%= video_info["title"] %> - Invidious -

<%= video_info["title"] %>

-
-
-

+ <%= likes %>

-

-  <%= dislikes %>

-
-
-

Views : <%= views %>

-

Rating : <%= rating %>

-

Calculated Rating : <%= calculated_rating %>

-

Engagement : <%= engagement %>%

-
-
<% fmt_stream.each do |fmt| %> -

<%= fmt["quality"] %>

- <% end %> + " type="<%= fmt["type"].split(";")[0] %>"> + <% end %> + +

<%= video_info["title"] %>

+
+
+

<%= video_record.views %>

+

<%= video_record.likes %>

+

<%= video_record.dislikes %>

+

Wilson Score : <%= ci_lower_bound(video_record.likes, video_record.likes + video_record.dislikes).round(4) %>

+

Rating : <%= video_record.rating.round(4) %> / 5

+ +

Engagement : <%= engagement.round(2) %>%

+

Earnings : <%= video_info.has_key?("allowed_ads") ? "~$" + ((video_record.views.to_f / 500).round(2)).to_s : "Unmonetized" %>

+

Allowed ads :
<%= video_info.has_key?("allowed_ads") ? video_info["allowed_ads"] : "Unmonetized" %>

+
+
+

<%= video_record.description %>

+
+
+ <% related_videos.each do |video| %> +

<%= video.content %>

+ <% end %>
\ No newline at end of file