From 100dfc2ffaf1e3b9801fcf6a05be15b79fc485ad Mon Sep 17 00:00:00 2001 From: Ashley //// Date: Thu, 1 Feb 2024 16:40:09 +0000 Subject: [PATCH] new reccomendation system :3 --- html/lite.ejs | 90 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 27 deletions(-) diff --git a/html/lite.ejs b/html/lite.ejs index 2c904271..55c6ea11 100644 --- a/html/lite.ejs +++ b/html/lite.ejs @@ -3,7 +3,7 @@ This Source Code Form is subject to the terms of the GNU General Public License: - Copyright (C) 2021-2023 POKETUBE (https://codeberg.org/Ashley/poketube) + Copyright (C) 2021-2024 POKETUBE (https://codeberg.org/Ashley/poketube) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -557,34 +557,70 @@ background: none !important; <% if (!f) { %> - <% k.Video.Recommendations.Video.forEach(x => { %> -
- <% if (!optout) { %> + +<% if (inv_vid.recommendedVideos) { %> - <%=x.duration || "LIVE" %> - <% } %> - <% if (optout) { %> - - <%- x.duration || "LIVE"%> - <% } %> - -
- - <% if (!optout) { %> - <%= x.Title %> - <% } %> - <% if (optout) { %> - <%= x.Title %> - <% } %> -
- <%=x.Channel.Name %> -
<%= x.uploadedAt.replace("Streamed", "Live") %> • <%= convert(x.views) %> views
-
-
-
- - <% }) %> +<% inv_vid?.recommendedVideos.forEach(x => { %> +
+ <% if (!optout) { %><%- turntomins(x.lengthSeconds) || "LIVE"%><% } %><% if (optout) { %><%- x.duration || "LIVE"%><% } %> +
+ <% if (!optout) { %> + + <%= x.title %> + + <% } %> + <% if (optout) { %> + + <%= x.title %> + <% } %> +
+ + <%=x.author %> + +
+ + <%= convert(x.viewCount) %> views + +
+
+
+
+ <% }) %> + + + <% } %> + <% } %> + + <% if (inv_vid.recommendedVideos.length < 1) { %> + <% channel_uploads.latestVideos.forEach(x => { %> +
+ <% if (!optout) { %><%- turntomins(x.lengthSeconds) || "LIVE"%><% } %><% if (optout) { %><%- x.duration || "LIVE"%><% } %> +
+ <% if (!optout) { %> + + <%= x.title %> + + <% } %> + <% if (optout) { %> + + <%= x.title %> + + <% } %> +
+ + <%=x.author %> + +
+ + <%= convert(x.viewCount) %> views + +
+
+
+
+ <% }) %> + <% } %> <% } %>