mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-15 04:28:43 +01:00
update some stuff :3
This commit is contained in:
parent
4e8af0337a
commit
2d78a1a7f6
1 changed files with 17 additions and 17 deletions
|
@ -57,20 +57,22 @@ const ChannelTabs = {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = function (app, config, renderTemplate) {
|
module.exports = function (app, config, renderTemplate) {
|
||||||
app.get("/download", async function (req, res) {
|
app.get("/download", async (req, res) => {
|
||||||
try {
|
try {
|
||||||
var v = req.query.v;
|
const v = req.query.v;
|
||||||
|
|
||||||
renderTemplate(res, req, "download.ejs", {
|
const thumbnailUrl = `https://i.ytimg.com/vi/${v}/maxresdefault.jpg`;
|
||||||
v,
|
const colors = await modules.getColors(thumbnailUrl);
|
||||||
color: await modules
|
const color = colors[0].hex();
|
||||||
.getColors(`https://i.ytimg.com/vi/${v}/maxresdefault.jpg`)
|
|
||||||
.then((colors) => colors[0].hex()),
|
renderTemplate(res, req, "download.ejs", {
|
||||||
isMobile: req.useragent.isMobile,
|
v,
|
||||||
});
|
color,
|
||||||
} catch {
|
isMobile: req.useragent.isMobile,
|
||||||
res.redirect("/");
|
});
|
||||||
}
|
} catch (error) {
|
||||||
|
res.redirect("/");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/old/watch", async function (req, res) {
|
app.get("/old/watch", async function (req, res) {
|
||||||
|
@ -106,8 +108,6 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
IsOldWindows = false;
|
IsOldWindows = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const poketube_universe_value = "poketube_smart_search";
|
|
||||||
|
|
||||||
if (query) {
|
if (query) {
|
||||||
let redirectTo = null;
|
let redirectTo = null;
|
||||||
let splitParam = ":";
|
let splitParam = ":";
|
||||||
|
@ -278,8 +278,8 @@ var tabExists = 'tab' in req.query;
|
||||||
var continuationExists = 'continuation' in req.query;
|
var continuationExists = 'continuation' in req.query;
|
||||||
|
|
||||||
|
|
||||||
if (ID.includes(bannedchannels) && !bypassExists && !tabExists && !continuationExists) {
|
if (bannedchannels.some(channel => channel === ID) && !bypassExists && !tabExists && !continuationExists) {
|
||||||
var cinv = {
|
var cinv = {
|
||||||
error:`this channel may include disinformation. If you still wanna view content <a href="/channel?id=${ID}&bypass=${bypassQuery}">click here</a> to bypass this restriction.`
|
error:`this channel may include disinformation. If you still wanna view content <a href="/channel?id=${ID}&bypass=${bypassQuery}">click here</a> to bypass this restriction.`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue