if no song dont go to / music lmafo

This commit is contained in:
Ashley 2022-08-25 12:12:57 +02:00
parent b5b35209af
commit a2cc2a309b

View file

@ -284,7 +284,10 @@ app.get("/music", async function (req, res) {
{ title: json.Title, artist: json.Channel.Name.replace("- Topic", "") }, { title: json.Title, artist: json.Channel.Name.replace("- Topic", "") },
1000 1000
); );
if (!song) {
res.redirect(`/watch?v=${v}`);
}
var lyrics = await musicInfo var lyrics = await musicInfo
.searchLyrics({ title: song.title, artist: song.artist }) .searchLyrics({ title: song.title, artist: song.artist })
.catch(() => null); .catch(() => null);