From e9e5fadcb82a280590f8f0f213a8602fde61be0b Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 16 Nov 2022 17:59:03 +0100 Subject: [PATCH] check if title is there --- src/libpoketube/init/pages-video.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libpoketube/init/pages-video.js b/src/libpoketube/init/pages-video.js index a30f8d00..297ba187 100644 --- a/src/libpoketube/init/pages-video.js +++ b/src/libpoketube/init/pages-video.js @@ -80,6 +80,7 @@ module.exports = function (app, config, renderTemplate) { const ip = JSON.parse(jj); const isvld = await core.isvalidvideo(v); + if (isvld) { core.video(v).then((data) => { @@ -88,7 +89,7 @@ module.exports = function (app, config, renderTemplate) { const engagement = data.engagement; var inv_comments = data.comments; const inv_vid = data.vid; - + if(json.Title) { if (!data.comments) inv_comments = "Disabled"; if (!core.video(v).b) { @@ -139,7 +140,9 @@ module.exports = function (app, config, renderTemplate) { inv_vid, lyrics: "", }); + } }); + } else { res.redirect("/");