From 358a4d831150aef7c8731d50dce7ae7862f4fb08 Mon Sep 17 00:00:00 2001 From: ashley Date: Wed, 22 May 2024 19:59:42 +0000 Subject: [PATCH] redirect to shorts if theres no videos :3 --- src/libpoketube/init/pages-channel-and-download.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libpoketube/init/pages-channel-and-download.js b/src/libpoketube/init/pages-channel-and-download.js index a31c1dca..5581cc77 100644 --- a/src/libpoketube/init/pages-channel-and-download.js +++ b/src/libpoketube/init/pages-channel-and-download.js @@ -368,6 +368,11 @@ module.exports = function (app, config, renderTemplate) { "
" ); const dnoreplace = about?.Description.toString(); + + + if(!Array.isArray(tj?.videos) && Array.isArray(shorts?.videos) ) { + res.redirect(`/channel?id=${req.query.id}&tab=shorts`) + } renderTemplate(res, req, "channel.ejs", { ID,