mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 07:58:28 +01: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) => {
|
||||
const {
|
||||
dm,
|
||||
region,
|
||||
hl,
|
||||
v,
|
||||
e,
|
||||
r,
|
||||
f,
|
||||
m,
|
||||
quality: q,
|
||||
a,
|
||||
universe,
|
||||
} = req.query;
|
||||
const { dm, region, hl, v, e, r, f, m, quality: q, a, universe, } = req.query;
|
||||
|
||||
if (!v) {
|
||||
return res.redirect("/");
|
||||
|
@ -238,11 +226,11 @@ module.exports = function (app, config, renderTemplate) {
|
|||
const reddit = extractInfo(REDDIT_REGEX);
|
||||
const instagram = extractInfo(INSTAGRAM_REGEX);
|
||||
|
||||
var proxyurl = config.p_url;
|
||||
var vidurl = u.url;
|
||||
var isvidious = u.isInvidiousURL;
|
||||
var mediaproxy = config.media_proxy
|
||||
|
||||
|
||||
if (inv_vid?.genre === "Music") {
|
||||
var vidurl = u.losslessurl;
|
||||
}
|
||||
|
@ -275,7 +263,9 @@ module.exports = function (app, config, renderTemplate) {
|
|||
|
||||
var uaos = req.useragent.os;
|
||||
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")
|
||||
res.redirect("/lite?v=" + req.query.v);
|
||||
|
@ -301,6 +291,7 @@ module.exports = function (app, config, renderTemplate) {
|
|||
twitter,
|
||||
k,
|
||||
dm,
|
||||
proxyurl,
|
||||
media_proxy_url: mediaproxy,
|
||||
instagram,
|
||||
useragent: req.useragent,
|
||||
|
|
Loading…
Reference in a new issue