dnoreplace :3

This commit is contained in:
Ashley 2022-09-29 19:17:54 +02:00
parent 99dfc45782
commit 0a2202afdc

View file

@ -151,6 +151,7 @@ app.get("/encryption", async function (req, res) {
}); });
///////////// VIDEO PAGES ETC. ///////////// ///////////// VIDEO PAGES ETC. /////////////
app.get("/watch", async function (req, res) { app.get("/watch", async function (req, res) {
/* /*
* QUERYS * QUERYS
@ -173,9 +174,11 @@ app.get("/watch", async function (req, res) {
const info = await fetch("http://ip-api.com/json/"); const info = await fetch("http://ip-api.com/json/");
const jj = await info.text(); const jj = await info.text();
const ip = JSON.parse(jj); const ip = JSON.parse(jj);
var badges = ""; var badges = "";
for (let i = 0; i < 3; i++) { // try 4 times, thanks kuylar
for (let i = 0; i < 4; i++) {
try { try {
const nightly = await fetch( const nightly = await fetch(
`https://lighttube-nightly.kuylar.dev/api/video?v=${v}` `https://lighttube-nightly.kuylar.dev/api/video?v=${v}`
@ -520,11 +523,18 @@ app.get("/channel/", async (req, res) => {
var d = ""; var d = "";
} }
var dnoreplace = description.toString()
if (dnoreplace === "[object Object]") {
var dnoreplace = "";
}
renderTemplate(res, req, "channel.ejs", { renderTemplate(res, req, "channel.ejs", {
ID: ID, ID: ID,
tab: tab, tab: tab,
j: k, j: k,
tj: tj, tj: tj,
dnoreplace:dnoreplace,
continuation:continuation, continuation:continuation,
wiki: w, wiki: w,
getFirstLine:getFirstLine, getFirstLine:getFirstLine,
@ -563,9 +573,6 @@ app.get("/js/:id", (req, res) => {
res.sendFile(__dirname + `/js/${req.params.id}`); res.sendFile(__dirname + `/js/${req.params.id}`);
}); });
app.get("/video/upload", (req, res) => {
res.redirect("https://youtube.com/upload");
});
///////////// API ///////////// ///////////// API /////////////