From a2cc2a309b5992db252ae77f56dfc451d8f4af00 Mon Sep 17 00:00:00 2001 From: Ashley Date: Thu, 25 Aug 2022 12:12:57 +0200 Subject: [PATCH] if no song dont go to / music lmafo --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index b8a1a0a2..d02c1d76 100644 --- a/server.js +++ b/server.js @@ -284,7 +284,10 @@ app.get("/music", async function (req, res) { { title: json.Title, artist: json.Channel.Name.replace("- Topic", "") }, 1000 ); - + + if (!song) { + res.redirect(`/watch?v=${v}`); + } var lyrics = await musicInfo .searchLyrics({ title: song.title, artist: song.artist }) .catch(() => null);