new proxy !!!!!!!!!!!!!

This commit is contained in:
Ashley 2023-01-10 16:00:45 +00:00
parent 4cf2159fc5
commit d34524749f

View file

@ -17,6 +17,7 @@ const {
getRandomInt, getRandomInt,
getRandomArbitrary, getRandomArbitrary,
} = require("../ptutils/libpt-coreutils.js"); } = require("../ptutils/libpt-coreutils.js");
const media_proxy = require("../libpoketube-video.js");
const sha384 = modules.hash; const sha384 = modules.hash;
const fetch = modules.fetch; const fetch = modules.fetch;
@ -181,6 +182,8 @@ module.exports = function (app, config, renderTemplate) {
const isvld = await core.isvalidvideo(v); const isvld = await core.isvalidvideo(v);
if (!v) res.redirect("/"); if (!v) res.redirect("/");
const u = await media_proxy(v);
var secure; var secure;
if ( if (
@ -243,6 +246,7 @@ module.exports = function (app, config, renderTemplate) {
color: data.color, color: data.color,
color2: data.color2, color2: data.color2,
engagement: engagement, engagement: engagement,
u,
video: json, video: json,
date: k.Video.uploadDate, date: k.Video.uploadDate,
e, e,