From fc78d18c9f8e7484553878e4d23377922b48e1a6 Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 4 Feb 2023 21:59:45 +0000 Subject: [PATCH] hehe taggy --- .../init/pages-channel-and-download.js | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/libpoketube/init/pages-channel-and-download.js b/src/libpoketube/init/pages-channel-and-download.js index 9f082c2e..427222e3 100644 --- a/src/libpoketube/init/pages-channel-and-download.js +++ b/src/libpoketube/init/pages-channel-and-download.js @@ -153,6 +153,28 @@ module.exports = function (app, config, renderTemplate) { var tj = " " } + try { + //videos + const b = await modules + .fetch(`https://inv.zzls.xyz/api/v1/channels/${ID}/shorts?sort_by=${req.query.sort_by || "newest"}` + continuation) + .then((res) => res.text()); + + var shorts = await getJson(b); + } catch { + var shorts = " " + } + + try { + //videos + const c = await modules + .fetch(`https://inv.zzls.xyz/api/v1/channels/${ID}/streams?sort_by=${req.query.sort_by || "newest"}` + continuation) + .then((res) => res.text()); + + var stream = await getJson(c); + } catch { + var stream = " " + } + const community = await modules .fetch(`${config.invapi}/channels/community/${ID}/`) .then((res) => res.text()); @@ -188,8 +210,10 @@ module.exports = function (app, config, renderTemplate) { renderTemplate(res, req, "channel.ejs", { ID, tab, + shorts, j: k, sort:req.query.sort_by, + stream, tj, c, convert,