lets test this :3

This commit is contained in:
ashley 2024-05-31 11:16:44 +00:00
parent 7aa8181f6f
commit 024fad830a

View file

@ -54,7 +54,7 @@
<link href="/css/yt-ukraine.svg?v=3" rel=icon> <link href="/css/yt-ukraine.svg?v=3" rel=icon>
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
<link href=/css/snow.css rel=stylesheet> <link href=/css/snow.css rel=stylesheet>
<title> <%=inv_vid.title%> | PokeTube </title> <title> <%=inv_vid.title%> | Watch </title>
<style> <style>
.comments-area { .comments-area {
background: #f1f9ff; background: #f1f9ff;
@ -1653,10 +1653,26 @@ Recommended Videos
<% if (!f) { %> <% if (!f) { %>
<% if (inv_vid.recommendedVideos) { %> <% if (inv_vid.recommendedVideos) { %>
<%
const musicChannels = new Set();
inv_vid?.recommendedVideos.forEach(video => {
if (video.title.toLowerCase().includes("official video") || video.title.toLowerCase().includes("official music video") || video.title.toLowerCase().includes("official audio")) {
musicChannels.add(video.authorId);
}
});
%>
<% inv_vid?.recommendedVideos.forEach(x => { %> <% inv_vid?.recommendedVideos.forEach(x => { %>
<div class="fade-in video channel-<%= x.authorId %>"> <div class="fade-in video channel-<%= x.authorId %>">
<% if (!optout) { %><a class="thumbnail" href="/watch?v=<%= x.videoId %>" style="background-image:url(<%- media_proxy_url %>/proxy?url=https://yt.miruku.cafe/vi/<%= x.videoId %>/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw);border-radius:9.5px" alt="<%= x.Title %>"><span class="video-length"><%- turntomins(x.lengthSeconds) || "LIVE"%></span><% } %><% if (optout) { %><a class="thumbnail"href="/watch?v=<%= x.videoId %>&m=f"style="background-image:url(<%- media_proxy_url %>/proxy?url=https://yt.miruku.cafe/vi/<%= x.videoId %>/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw);border-radius:9.5px"alt="<%= x.Title %>"><span class="video-length"><%- x.duration || "LIVE"%></span><% } %></a> <% if (!optout) { %>
<a class="thumbnail" href="/watch?v=<%= x.videoId %>" style="background-image:url(<%- media_proxy_url %>/proxy?url=https://yt.miruku.cafe/vi/<%= x.videoId %>/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw);border-radius:9.5px" alt="<%= x.Title %>">
<span class="video-length"><%- turntomins(x.lengthSeconds) || "LIVE"%></span>
<% } %>
<% if (optout) { %>
<a class="thumbnail" href="/watch?v=<%= x.videoId %>&m=f" style="background-image:url(<%- media_proxy_url %>/proxy?url=https://yt.miruku.cafe/vi/<%= x.videoId %>/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLBy_x4UUHLNDZtJtH0PXeQGoRFTgw);border-radius:9.5px" alt="<%= x.Title %>">
<span class="video-length"><%- x.duration || "LIVE"%></span>
<% } %>
</a>
<div class="info"> <div class="info">
<% if (!optout) { %> <% if (!optout) { %>
<a class="max-lines-2 title" href="/watch?v=<%= x.videoId %>" style="font-stretch:ultra-expanded;font-weight:850" title="<%= x.title %>"> <a class="max-lines-2 title" href="/watch?v=<%= x.videoId %>" style="font-stretch:ultra-expanded;font-weight:850" title="<%= x.title %>">
@ -1664,30 +1680,31 @@ Recommended Videos
</a> </a>
<% } %> <% } %>
<% if (optout) { %> <% if (optout) { %>
<a class="max-lines-2 title" href="/watch?v=<%= x.videoId %>&m=f" style="font-stretch:100%;font-weight:800" title="<%= x.Title %>"> <a class="max-lines-2 title" href="/watch?v=<%= x.videoId %>&m=f" style="font-stretch:100%;font-weight:800" title="<%= x.title %>">
<%= x.title %> <%= x.title %>
</a> </a>
<% } %> <% } %>
<div> <div>
<a class="max-lines-2" href="/channel?id=<%= x.authorId %>@youtube.com" style="-webkit-line-clamp:1;width:12em;word-wrap:break-word"> <a class="max-lines-2" href="/channel?id=<%= x.authorId %>@youtube.com" style="-webkit-line-clamp:1;width:12em;word-wrap:break-word">
<span> <%=x.author %> <% if (x?.authorVerified) { %> <span>
<% if (x.title.toLowerCase().includes("official video") || x.title.toLowerCase().includes("official music video") || x.title.toLowerCase().includes("official audio")) { %> <%= x.author %>
<i class="fa-light fa-music-note" style="margin-left: 0em;" title="official artist channel"></i> <% if (x?.authorVerified) { %>
<% if (musicChannels.has(x.authorId)) { %>
<i class="fa fa-music" style="margin-left: 0em;" title="official artist channel"></i>
<% } else { %> <% } else { %>
<i class="icon ion ion-md-checkmark-circle" style="margin-left: 0em;" title="verified channel"></i> <i class="icon ion ion-md-checkmark-circle" style="margin-left: 0em;" title="verified channel"></i>
<% } %> <% } %>
<% } %> <% } %>
</span> </span>
</a> </a>
<div class="video-views"> <div class="video-views">
<%= convert(x.viewCount) %> views <%= convert(x.viewCount) %> views
</div>
</div>
</div>
</div>
<% }) %>
</div>
</div>
</div>
</div>
<% }) %>
<% } %> <% } %>