fix some issues :p

This commit is contained in:
Ashley 2022-12-20 08:21:13 +00:00
parent 814e894ba3
commit 2bff8eb46f

View file

@ -260,64 +260,72 @@ module.exports = function (app, config, renderTemplate) {
if (isvld) { if (isvld) {
core.video(v).then((data) => { core.video(v).then((data) => {
const k = data.video; if (data) {
const json = data.json; if (data.video) {
const engagement = data.engagement; const k = data.video;
var inv_comments = data.comments; const json = data.json;
const inv_vid = data.vid; const engagement = data.engagement;
if (json.Title) { var inv_comments = data.comments;
if (!data.comments) inv_comments = "Disabled"; const inv_vid = data.vid;
if (json) {
if (json.Title) {
if (!data.comments) inv_comments = "Disabled";
if (!core.video(v).b) { if (!core.video(v).b) {
var nnn = ""; var nnn = "";
var badges = ""; var badges = "";
var comments = ""; var comments = "";
}
if (!v) res.redirect("/");
if (q === "medium") {
var url = `https://inv.vern.cc/latest_version?id=${v}&itag=18&local=true`;
}
const desc = data.desc;
if (d) {
var d = desc.toString().replace(/\n/g, " <br> ");
}
if (d === "[object Object]") {
var d = false;
}
renderTemplate(res, req, "lite.ejs", {
color: data.color,
color2: data.color2,
engagement: engagement,
video: json,
date: k.Video.uploadDate,
e: e,
k: k,
process: process,
sha384: sha384,
lightOrDark,
isMobile: req.useragent.isMobile,
tj: data.channel,
r: r,
qua: q,
inv: inv_comments,
ip: ip,
convert: convert,
wiki: data.wiki,
f: f,
t: config.t_url,
optout: t,
badges: badges,
desc: desc,
comments: comments,
n: nnn,
inv_vid,
lyrics: "",
});
}
}
} }
} else {
if (!v) res.redirect("/"); res.redirect("/");
if (q === "medium") {
var url = `https://inv.vern.cc/latest_version?id=${v}&itag=18&local=true`;
}
const desc = data.desc;
if (d) {
var d = desc.toString().replace(/\n/g, " <br> ");
}
if (d === "[object Object]") {
var d = false;
}
renderTemplate(res, req, "lite.ejs", {
color: data.color,
color2: data.color2,
engagement: engagement,
video: json,
date: k.Video.uploadDate,
e: e,
k: k,
process: process,
sha384: sha384,
lightOrDark,
isMobile: req.useragent.isMobile,
tj: data.channel,
r: r,
qua: q,
inv: inv_comments,
ip: ip,
convert: convert,
wiki: data.wiki,
f: f,
t: config.t_url,
optout: t,
badges: badges,
desc: desc,
comments: comments,
n: nnn,
inv_vid,
lyrics: "",
});
} }
}); });
} else { } else {
@ -325,6 +333,7 @@ module.exports = function (app, config, renderTemplate) {
} }
}); });
app.get("/music", async function (req, res) { app.get("/music", async function (req, res) {
/* /*
* QUERYS * QUERYS