From 663ba34ec65a3fbd226d9db91bbe44e397358cf5 Mon Sep 17 00:00:00 2001 From: Ashley Date: Thu, 13 Oct 2022 20:48:58 +0200 Subject: [PATCH] remove lighttube proxy --- server.js => 5server.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) rename server.js => 5server.js (98%) diff --git a/server.js b/5server.js similarity index 98% rename from server.js rename to 5server.js index 9e77b43f..1d4440d9 100644 --- a/server.js +++ b/5server.js @@ -197,9 +197,20 @@ app.get("/watch", async function (req, res) { if (!v) res.redirect("/"); //video - if (!q) url = `https://tube.kuylar.dev/proxy/media/${v}/22`; + + var u = inv_vid.formatStreams; + + if (u.includes("url", 2)) { + u = inv_vid.formatStreams[2].url; + } + if (!u.includes("url", 2)) { + u = inv_vid.formatStreams[1].url; + } + + var url = u; + if (q === "medium") { - var url = `https://tube.kuylar.dev/proxy/media/${v}/18`; + var url = inv_vid.formatStreams[1].url; } // encryption