From ea94850d38755ad497bb8b8120af85fead6a8ea2 Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 8 Aug 2022 19:48:56 +0300 Subject: [PATCH] resolution les goo --- server.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index cb5f8a3f..c611bb27 100644 --- a/server.js +++ b/server.js @@ -125,12 +125,15 @@ app.get("/watch", async function (req, res) { * r = Recommended videos * f = Recent videos from channel * t = Piwik OptOut + * q = quality obv */ var v = req.query.v; var e = req.query.e; var r = req.query.r; var f = req.query.f; var t = req.query.t; + var q = req.query.quality; + const video = await fetch(config.tubeApi + `video?v=${v}`); var fetching = await fetcher(v); @@ -140,9 +143,12 @@ app.get("/watch", async function (req, res) { const k = JSON.parse(toJson(h)); if (!v) res.redirect("/"); - // video - const url = `https://tube.kuylar.dev/proxy/media/${v}/22` - + //video + if(!q) url = `https://tube.kuylar.dev/proxy/media/${v}/22` + if(q === "medium") { + var url = `https://tube.kuylar.dev/proxy/media/${v}/18` + } + // encryption const url_e = url + "?e="+ sha384(json.id) + sha384(json.Title) + sha384(json.Channel.id) + sha384(json.Channel.id) + "Piwik" + sha384(config.t_url) @@ -171,6 +177,7 @@ app.get("/watch", async function (req, res) { isMobile:req.useragent.isMobile, tj: tj, r: r, + qua:q, f: f, t: config.t_url, optout: t,