mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 21:57:49 +01:00
also remove yandere code :3
This commit is contained in:
parent
6f196fe0f4
commit
ba14563c1a
1 changed files with 69 additions and 74 deletions
|
@ -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("/");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue