mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 09:58:14 +01:00
add poke atmos :3
This commit is contained in:
parent
7b4842fe92
commit
844c526a6b
1 changed files with 29 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue