also remove yandere code :3

This commit is contained in:
Ashley 2022-12-24 10:49:52 +00:00
parent 6f196fe0f4
commit ba14563c1a

View file

@ -119,10 +119,7 @@ module.exports = function (app, config, renderTemplate) {
let url;
if (j_.URL != undefined) url = j_.URL;
if (json) {
if (json.Title) {
if (json.Channel.Name) {
if (json.Description) {
if ("Title" in json) {
// json response
const re = {
main: {
@ -139,9 +136,6 @@ module.exports = function (app, config, renderTemplate) {
res.json(re);
}
}
}
}
});
app.get("/watch", async function (req, res) {
@ -164,19 +158,20 @@ module.exports = function (app, config, renderTemplate) {
const info = await modules.fetch("http://ip-api.com/json/");
const jj = await info.text();
const ip = JSON.parse(jj);
const isvld = await core.isvalidvideo(v);
if (isvld) {
core.video(v).then((data) => {
if (data) {
if (data.video) {
if ("video" in data) {
const k = data.video;
const json = data.json;
const engagement = data.engagement;
var inv_comments = data.comments;
const inv_vid = data.vid;
if (json) {
if (json.Title) {
if ("Title" in json) {
if (!data.comments) inv_comments = "Disabled";
if (!core.video(v).b) {
@ -192,6 +187,7 @@ module.exports = function (app, config, renderTemplate) {
}
const desc = data.desc;
if (d) {
var d = desc.toString().replace(/\n/g, " <br> ");
}
@ -231,7 +227,6 @@ module.exports = function (app, config, renderTemplate) {
});
}
}
}
} else {
res.redirect("/");
}