From 8eab3f68406c57b8cfc181cc227213bb32f12662 Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 21 Jan 2023 18:00:51 +0000 Subject: [PATCH] real :p --- src/libpoketube/init/pages-video.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/libpoketube/init/pages-video.js b/src/libpoketube/init/pages-video.js index bb0174ec..4a5fbc53 100644 --- a/src/libpoketube/init/pages-video.js +++ b/src/libpoketube/init/pages-video.js @@ -195,7 +195,7 @@ module.exports = function (app, config, renderTemplate) { req.hostname == "poketube.site" || req.hostname == "poketube.online" || req.hostname == "poketube.xyz" - ) { + ) { secure = true; } else { secure = false; @@ -445,19 +445,20 @@ module.exports = function (app, config, renderTemplate) { const c = await channel.text(); const tj = JSON.parse(modules.toJson(c)); - // info - const song = await musicInfo.searchSong( - { - title: k.Video.Title, - artist: json.Channel.Name.replace("- Topic", ""), - }, - 1000 - ); - - if (!song) { - res.redirect(`/watch?v=${v}`); - } try { + // info + const song = await musicInfo.searchSong( + { + title: k.Video.Title, + artist: json.Channel.Name.replace("- Topic", ""), + }, + 1000 + ); + + if (!song) { + res.redirect(`/watch?v=${v}`); + } + const lyrics = await lyricsFinder(song.artist + song.title); if (lyrics == undefined) ly = "This Is Where I'd Put The songs lyrics. IF IT HAD ONE ";