add proxyurl lol

This commit is contained in:
Ashley //// 2024-01-19 12:51:15 +00:00
parent c995e19871
commit 3f077557fb

View file

@ -178,19 +178,7 @@ module.exports = function (app, config, renderTemplate) {
}); });
app.get("/watch", async (req, res) => { app.get("/watch", async (req, res) => {
const { const { dm, region, hl, v, e, r, f, m, quality: q, a, universe, } = req.query;
dm,
region,
hl,
v,
e,
r,
f,
m,
quality: q,
a,
universe,
} = req.query;
if (!v) { if (!v) {
return res.redirect("/"); return res.redirect("/");
@ -237,12 +225,12 @@ module.exports = function (app, config, renderTemplate) {
const twitch = extractInfo(TWITCH_REGEX); const twitch = extractInfo(TWITCH_REGEX);
const reddit = extractInfo(REDDIT_REGEX); const reddit = extractInfo(REDDIT_REGEX);
const instagram = extractInfo(INSTAGRAM_REGEX); const instagram = extractInfo(INSTAGRAM_REGEX);
var proxyurl = config.p_url;
var vidurl = u.url; var vidurl = u.url;
var isvidious = u.isInvidiousURL; var isvidious = u.isInvidiousURL;
var mediaproxy = config.media_proxy var mediaproxy = config.media_proxy
if (inv_vid?.genre === "Music") { if (inv_vid?.genre === "Music") {
var vidurl = u.losslessurl; var vidurl = u.losslessurl;
} }
@ -275,7 +263,9 @@ module.exports = function (app, config, renderTemplate) {
var uaos = req.useragent.os; var uaos = req.useragent.os;
const browser = req.useragent.browser; const browser = req.useragent.browser;
const IsOldWindows = (uaos === "Windows 7" || uaos === "Windows 8") && browser === "Firefox"; const IsOldWindows =
(uaos === "Windows 7" || uaos === "Windows 8") &&
browser === "Firefox";
if (uaos === "Windows XP" || uaos === "Windows Vista") if (uaos === "Windows XP" || uaos === "Windows Vista")
res.redirect("/lite?v=" + req.query.v); res.redirect("/lite?v=" + req.query.v);
@ -301,6 +291,7 @@ module.exports = function (app, config, renderTemplate) {
twitter, twitter,
k, k,
dm, dm,
proxyurl,
media_proxy_url: mediaproxy, media_proxy_url: mediaproxy,
instagram, instagram,
useragent: req.useragent, useragent: req.useragent,