1
Fork 0

remove channelfirstvideoobject :3

This commit is contained in:
ashley 2024-07-24 10:12:48 +00:00
parent e5ec4e6679
commit dae6282b85

View file

@ -314,23 +314,10 @@ module.exports = function (app, config, renderTemplate) {
}
}
let ChannelFirstVideoObject;
const source = [tj, shorts, stream].find(
(i) => i && i.videos && i.videos.length > 0
);
if (source) {
ChannelFirstVideoObject = await fetch(
`${config.invapi}/videos/${source.videos[0].videoId}`
)
.then((res) => res.text())
.then((txt) => JSON.parse(txt));
} else {
ChannelFirstVideoObject = {
let ChannelFirstVideoObject = {
subCountText: "0",
authorVerified: false,
};
}
renderTemplate(res, req, "channel.ejs", {
ID,