diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.cr index fc62c5a3..201d324b 100644 --- a/src/invidious/routes/feeds.cr +++ b/src/invidious/routes/feeds.cr @@ -128,6 +128,7 @@ module Invidious::Routes::Feeds watched = user.watched.reverse[(page - 1) * max_results, max_results] end watched ||= [] of String + watched = watched.map { |id| get_video(id) } templated "feeds/history" end diff --git a/src/invidious/views/feeds/history.ecr b/src/invidious/views/feeds/history.ecr index 2234b297..e19e3bb0 100644 --- a/src/invidious/views/feeds/history.ecr +++ b/src/invidious/views/feeds/history.ecr @@ -31,20 +31,51 @@ <% watched.each do |item| %>
<%= HTML.escape(item.title) %>
+ +<%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.utc).ago, locale)) %>
+ <% elsif Time.utc - item.published > 1.minute %> +<%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %>
+ <% end %> +<%= translate_count(locale, "generic_views_count", item.views || 0, NumberFormatting::Short) %>
+