mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 21:57:49 +01:00
fix some stuff lol
This commit is contained in:
parent
d2a903119d
commit
6890f15f59
1 changed files with 3 additions and 20 deletions
|
@ -33,31 +33,14 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
try {
|
try {
|
||||||
var v = req.query.v;
|
var v = req.query.v;
|
||||||
|
|
||||||
// video
|
|
||||||
const video = await modules.fetch(config.tubeApi + `video?v=${v}`);
|
|
||||||
const h = await video.text();
|
|
||||||
const k = JSON.parse(modules.toJson(h));
|
|
||||||
|
|
||||||
if (!v) res.redirect("/");
|
|
||||||
|
|
||||||
var fetching = await fetcher(v);
|
|
||||||
|
|
||||||
const json = fetching.video.Player;
|
|
||||||
const engagement = fetching.engagement;
|
|
||||||
|
|
||||||
/*
|
|
||||||
renderTemplate(res, req, "download.ejs", {
|
renderTemplate(res, req, "download.ejs", {
|
||||||
engagement: engagement,
|
v,
|
||||||
k: k,
|
|
||||||
video: json,
|
|
||||||
date: k.Video.uploadDate,
|
|
||||||
color: await modules
|
color: await modules
|
||||||
.getColors(`https://i.ytimg.com/vi/${v}/maxresdefault.jpg`)
|
.getColors(`https://i.ytimg.com/vi/${v}/maxresdefault.jpg`)
|
||||||
.then((colors) => colors[0].hex()),
|
.then((colors) => colors[0].hex()),
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
res.send("download page is broken rn - will be fixed soon !!!!!!! sorry :c - btw ily")
|
|
||||||
} catch {
|
} catch {
|
||||||
res.redirect("/");
|
res.redirect("/");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue