1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 06:34:40 -05:00

add poke atmos :3

This commit is contained in:
Ashley 2023-02-15 17:27:32 +00:00
parent 1a7b16ff99
commit a393f7e2f5

View file

@ -18,6 +18,7 @@ const {
getRandomArbitrary,
} = require("../ptutils/libpt-coreutils.js");
const media_proxy = require("../libpoketube-video.js");
const atmos = require("../../../pokeatmosurls.json");
const sha384 = modules.hash;
const fetch = modules.fetch;
@ -68,6 +69,12 @@ async function lyricsFinder(e = "", d = "") {
return String(encoding.convert(final)).trim();
}
function toObject(arr) {
var rv = {};
for (var i = 0; i < arr.length; ++i) if (arr[i] !== undefined) rv[i] = arr[i];
return rv;
}
function lightOrDark(color) {
// Variables for red, green, blue values
var r, g, b, hsp;
@ -433,11 +440,15 @@ module.exports = function (app, config, renderTemplate) {
res.redirect(`/watch?v=${v}`);
}
if (req.useragent.isMobile) {
res.redirect(`/watch?v=${v}`);
}
//video
var url = `https://tube.kuylar.dev/proxy/media/${v}/22`;
// encryption
const url_e =
var url_e =
url +
"?e=" +
sha384(k.Video.Channel.id) +
@ -445,6 +456,23 @@ module.exports = function (app, config, renderTemplate) {
"Piwik" +
sha384(config.t_url);
const stringed = toObject(atmos);
const search = what => atmos.find(element => element.id === what);
const mos = search(v)
if (mos) {
var url_e =
mos.url +
"?e=" +
sha384(k.Video.Channel.id) +
sha384(k.Video.Channel.id) +
"Piwik" +
sha384(config.t_url);
} else {
}
// channel info
const engagement = fetching.engagement;
const channel = await modules.fetch(