mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-17 05:54:42 -05:00
add proxyurl lol
This commit is contained in:
parent
c995e19871
commit
3f077557fb
1 changed files with 8 additions and 17 deletions
|
@ -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("/");
|
||||||
|
@ -238,11 +226,11 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue