From 264b1349a46f46931a14cdc758282a3a22c78abc Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 27 Aug 2022 15:17:43 +0200 Subject: [PATCH] remove /old --- server.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/server.js b/server.js index d02c1d76..931c4c34 100644 --- a/server.js +++ b/server.js @@ -361,26 +361,8 @@ app.get("/old/watch", async function (req, res) { var v = req.query.v; var e = req.query.e; if (!v) res.redirect("/"); - var fetching = await fetcher(v); - const j = fetching.video.Player.Formats.Format, - j_ = Array.isArray(j) ? j[j.length - 1] : j; - let url; - if (j_.URL != undefined) url = j_.URL; - const json = fetching.video.Player; - const engagement = fetching.engagement; - const lyrics = "" - renderTemplate(res, req, "poketube-old.ejs", { - url: url, - color: await getColors( - `https://i.ytimg.com/vi/${v}/maxresdefault.jpg` - ).then((colors) => colors[0].hex()), - engagement: engagement, - video: json, - date: "see the new ui", //return "" - e: e, - lyrics: "none, see the new ui", - }); + res.redirect(`/watch?v=${v}`); }); app.get("/discover", async function (req, res) {