Playlist: Use subtitle when author is missing

This commit is contained in:
ChunkyProgrammer
2023-08-01 08:55:23 -07:00
parent ac0c0609bb
commit d7696574f4
2 changed files with 10 additions and 1 deletions

View File

@@ -70,7 +70,11 @@
</b>
<% else %>
<b>
<a href="/channel/<%= playlist.ucid %>"><%= author %></a> |
<% if !author.empty? %>
<a href="/channel/<%= playlist.ucid %>"><%= author %></a> |
<% elsif !playlist.subtitle.nil? %>
<span><%= playlist.subtitle.try &.split(" • ")[0] %></span> |
<% end %>
<%= translate_count(locale, "generic_videos_count", playlist.video_count) %> |
<%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %>
</b>