<% title = HTML.escape(playlist.title) %> <% author = HTML.escape(playlist.author) %> <% content_for "header" do %> <%= title %> - Invidious <% end %>

<%= title %>

<% if playlist.is_a? InvidiousPlaylist %> <% if playlist.author == user.try &.email %> <%= author %> | <% else %> <%= author %> | <% end %> <%= translate_count(locale, "generic_videos_count", playlist.video_count) %> | <%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %> | <% case playlist.as(InvidiousPlaylist).privacy when %> <% when PlaylistPrivacy::Public %> <%= translate(locale, "Public") %> <% when PlaylistPrivacy::Unlisted %> <%= translate(locale, "Unlisted") %> <% when PlaylistPrivacy::Private %> <%= translate(locale, "Private") %> <% end %> <% else %> <%= author %> | <%= translate_count(locale, "generic_videos_count", playlist.video_count) %> | <%= translate(locale, "Updated `x` ago", recode_date(playlist.updated, locale)) %> <% end %> <% if !playlist.is_a? InvidiousPlaylist %> <% end %>

<% if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email %>
<% else %> <% if Invidious::Database::Playlists.exists?(playlist.id) %>
<% else %>
<% end %> <% end %>

<%= playlist.description_html %>
<% if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email %>

<% end %>

<% if playlist.is_a?(InvidiousPlaylist) && playlist.author == user.try &.email %> <% end %>
<% videos.each do |item| %> <%= rendered "components/item" %> <% end %>
<% if page > 1 %> <%= translate(locale, "Previous page") %> <% end %>
<% if page_count != 1 && page < page_count %> <%= translate(locale, "Next page") %> <% end %>