mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 23:57:50 +01:00
make the channel pages faster,,
This commit is contained in:
parent
e2120319f4
commit
4b76c5187b
1 changed files with 7 additions and 17 deletions
|
@ -210,16 +210,8 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
|
|
||||||
const tab = req.query.tab;
|
const tab = req.query.tab;
|
||||||
const cache = {};
|
const cache = {};
|
||||||
|
|
||||||
try {
|
|
||||||
// about
|
|
||||||
const bout = await fetch(config.tubeApi + `channel?id=${ID}&tab=about`);
|
|
||||||
const h = await bout.text();
|
|
||||||
var boutJson = JSON.parse(modules.toJson(h));
|
|
||||||
} catch {
|
|
||||||
boutJson = " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
const continuation = req.query.continuation
|
const continuation = req.query.continuation
|
||||||
? `&continuation=${req.query.continuation}`
|
? `&continuation=${req.query.continuation}`
|
||||||
: "";
|
: "";
|
||||||
|
@ -301,13 +293,11 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
var { tj, shorts, stream, c, boutJson } = cache[ID].result;
|
var { tj, shorts, stream, c, boutJson } = cache[ID].result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const subscribers = boutJson.Channel?.Metadata.Subscribers;
|
//TOBEREMOVED
|
||||||
const about = boutJson?.Channel?.Contents?.ItemSection?.About;
|
const subscribers = ""
|
||||||
const description = about?.Description.toString().replace(
|
const about = ""
|
||||||
/\n/g,
|
const description = ""
|
||||||
" <br> "
|
const dnoreplace = ""
|
||||||
);
|
|
||||||
const dnoreplace = about?.Description.toString();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue