mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-14 18:28:44 +01:00
add try catch :p
This commit is contained in:
parent
96a8eba7ec
commit
7b8c7dcb73
1 changed files with 141 additions and 138 deletions
|
@ -199,10 +199,11 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
secure = false;
|
secure = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (isvld) {
|
if (isvld) {
|
||||||
core.video(v).then((data) => {
|
core.video(v).then((data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
if ("video" in getJson(data)) {
|
if ("video" in data) {
|
||||||
const k = data.video;
|
const k = data.video;
|
||||||
const json = data.json;
|
const json = data.json;
|
||||||
const engagement = data.engagement;
|
const engagement = data.engagement;
|
||||||
|
@ -279,6 +280,9 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
} else {
|
} else {
|
||||||
res.redirect("/");
|
res.redirect("/");
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
res.redirect("/");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/lite", async function (req, res) {
|
app.get("/lite", async function (req, res) {
|
||||||
|
@ -448,8 +452,8 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const lyrics = await lyricsFinder(song.artist + song.title);
|
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 ";
|
if (lyrics == undefined)
|
||||||
|
ly = "This Is Where I'd Put The songs lyrics. IF IT HAD ONE ";
|
||||||
|
|
||||||
var ly = "";
|
var ly = "";
|
||||||
if (lyrics) {
|
if (lyrics) {
|
||||||
|
@ -480,5 +484,4 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue