From ae9e80b5e568203af1e56953b1a6b409bd2739ea Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 21 May 2023 20:20:27 +0000 Subject: [PATCH] optimize code owo --- src/libpoketube/init/pages-channel-and-download.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libpoketube/init/pages-channel-and-download.js b/src/libpoketube/init/pages-channel-and-download.js index e3fa19f6..df5b61f5 100644 --- a/src/libpoketube/init/pages-channel-and-download.js +++ b/src/libpoketube/init/pages-channel-and-download.js @@ -158,15 +158,24 @@ module.exports = function (app, config, renderTemplate) { return null; } }; + + var tj = await getChannelData( `https://invid-api.poketube.fun/api/v1/channels/videos/${ID}/?sort_by=${sort_by}${continuation}` ); + + if(tab === "shorts") { var shorts = await getChannelData( `https://invid-api.poketube.fun/api/v1/channels/${ID}/shorts?sort_by=${sort_by}${continuations}` ); + } + + if(tab === "live") { var stream = await getChannelData( `https://invid-api.poketube.fun/api/v1/channels/${ID}/streams?sort_by=${sort_by}${continuationl}` ); + } + var c = await getChannelData( `https://invid-api.poketube.fun/api/v1/channels/community/${ID}/` );