<%= HTML.escape(item.author) %><% if !item.author_verified.nil? && item.author_verified %> <% end %>
@@ -23,7 +23,7 @@ <% if !env.get("preferences").as(Preferences).thin_mode %><%= translate_count(locale, "generic_videos_count", item.video_count, NumberFormatting::Separator) %>
<%= recode_length_seconds(item.length_seconds) %>
<% end %> @@ -51,16 +51,13 @@ <% if !env.get("preferences").as(Preferences).thin_mode %> <% if env.get("preferences").as(Preferences).show_nick %><%= number_with_separator(video.views) %>
<%= number_with_separator(video.likes) %>
- +<%= translate(locale, "Genre: ") %> <% if !video.genre_url %> <%= video.genre %> @@ -185,9 +185,9 @@ we're going to need to do it here in order to allow for translations.
<%= translate(locale, "License: ") %><%= video.license %>
<% end %><%= translate(locale, "Family friendly? ") %><%= translate_bool(locale, video.is_family_friendly) %>
-<%= translate(locale, "Wilson score: ") %><%= video.wilson_score %>
- -<%= translate(locale, "Engagement: ") %><%= video.engagement %>%
+ + + <% if video.allowed_regions.size != REGIONS.size %><% if video.allowed_regions.size < REGIONS.size // 2 %> diff --git a/src/invidious/yt_backend/extractors.cr b/src/invidious/yt_backend/extractors.cr index c4326cab..b9609eb9 100644 --- a/src/invidious/yt_backend/extractors.cr +++ b/src/invidious/yt_backend/extractors.cr @@ -417,7 +417,7 @@ private module Extractors # {"tabRenderer": { # "endpoint": {...} # "title": "Playlists", - # "selected": true, + # "selected": true, # Is nil unless tab is selected # "content": {...}, # ... # }} diff --git a/src/invidious/yt_backend/extractors_utils.cr b/src/invidious/yt_backend/extractors_utils.cr index 3d5e5787..f8245160 100644 --- a/src/invidious/yt_backend/extractors_utils.cr +++ b/src/invidious/yt_backend/extractors_utils.cr @@ -84,7 +84,7 @@ end def extract_selected_tab(tabs) # Extract the selected tab from the array of tabs Youtube returns - return selected_target = tabs.as_a.select(&.["tabRenderer"]?.try &.["selected"].as_bool)[0]["tabRenderer"] + return selected_target = tabs.as_a.select(&.["tabRenderer"]?.try &.["selected"]?.try &.as_bool)[0]["tabRenderer"] end def fetch_continuation_token(items : Array(JSON::Any))