From cc425b7b977aa73b25bf20c5715c75f8bdd377bf Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 4 Jun 2023 13:51:24 +0000 Subject: [PATCH] fix channels lmao --- .../init/pages-channel-and-download.js | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/libpoketube/init/pages-channel-and-download.js b/src/libpoketube/init/pages-channel-and-download.js index df5b61f5..7bfa1f70 100644 --- a/src/libpoketube/init/pages-channel-and-download.js +++ b/src/libpoketube/init/pages-channel-and-download.js @@ -158,27 +158,23 @@ module.exports = function (app, config, renderTemplate) { return null; } }; - - - var tj = await getChannelData( + + var tjPromise = getChannelData( `https://invid-api.poketube.fun/api/v1/channels/videos/${ID}/?sort_by=${sort_by}${continuation}` ); - - if(tab === "shorts") { - var shorts = await getChannelData( + var shortsPromise = getChannelData( `https://invid-api.poketube.fun/api/v1/channels/${ID}/shorts?sort_by=${sort_by}${continuations}` ); - } - - if(tab === "live") { - var stream = await getChannelData( + var streamPromise = getChannelData( `https://invid-api.poketube.fun/api/v1/channels/${ID}/streams?sort_by=${sort_by}${continuationl}` ); - } - - var c = await getChannelData( + var cPromise = getChannelData( `https://invid-api.poketube.fun/api/v1/channels/community/${ID}/` ); + var tj = await tjPromise; + var shorts = await shortsPromise; + var stream = await streamPromise; + var c = await cPromise; cache[ID] = { result: {