diff --git a/src/invidious/views/components/item.ecr b/src/invidious/views/components/item.ecr index 7cfd38db..693cef48 100644 --- a/src/invidious/views/components/item.ecr +++ b/src/invidious/views/components/item.ecr @@ -31,9 +31,13 @@ <% end %>

<%= HTML.escape(item.title) %>

- + <% if !item.ucid.to_s.empty? %> + +

<%= HTML.escape(item.author) %><% if !item.is_a?(InvidiousPlaylist) && !item.author_verified.nil? && item.author_verified %> <% end %>

+
+ <% else %>

<%= HTML.escape(item.author) %><% if !item.is_a?(InvidiousPlaylist) && !item.author_verified.nil? && item.author_verified %> <% end %>

- + <% end %> <% when MixVideo %> <% if !env.get("preferences").as(Preferences).thin_mode %> @@ -51,9 +55,13 @@ <% end %>

<%= HTML.escape(item.title) %>

- + <% if !item.ucid.to_s.empty? %> + +

<%= HTML.escape(item.author) %>

+
+ <% else %>

<%= HTML.escape(item.author) %>

- + <% end %> <% when PlaylistVideo %> <% if !env.get("preferences").as(Preferences).thin_mode %> @@ -85,9 +93,15 @@
-
-

<%= HTML.escape(item.author) %>

-
+
+ <% if !item.ucid.to_s.empty? %> + +

<%= HTML.escape(item.author) %>

+
+ <% else %> +

<%= HTML.escape(item.author) %>

+ <% end %> +
<% endpoint_params = "?v=#{item.id}&list=#{item.plid}" %> <%= rendered "components/video-context-buttons" %>
@@ -147,9 +161,15 @@
-
-

<%= HTML.escape(item.author) %><% if !item.is_a?(ChannelVideo) && !item.author_verified.nil? && item.author_verified %> <% end %>

-
+
+ <% if !item.ucid.to_s.empty? %> + +

<%= HTML.escape(item.author) %><% if !item.is_a?(ChannelVideo) && !item.author_verified.nil? && item.author_verified %> <% end %>

+
+ <% else %> +

<%= HTML.escape(item.author) %><% if !item.is_a?(ChannelVideo) && !item.author_verified.nil? && item.author_verified %> <% end %>

+ <% end %> +
<% endpoint_params = "?v=#{item.id}" %> <%= rendered "components/video-context-buttons" %> diff --git a/src/invidious/yt_backend/extractors.cr b/src/invidious/yt_backend/extractors.cr index 6686e6e7..aa252b68 100644 --- a/src/invidious/yt_backend/extractors.cr +++ b/src/invidious/yt_backend/extractors.cr @@ -764,7 +764,7 @@ module HelperExtractors # Retrieves the ID required for querying the InnerTube browse endpoint. # Raises when it's unable to do so def self.get_browse_id(container) - return container.dig("navigationEndpoint", "browseEndpoint", "browseId").as_s + return container.dig?("navigationEndpoint", "browseEndpoint", "browseId").try &.as_s || "" end end