This commit is contained in:
ashley 2024-07-15 20:07:20 +00:00
parent cd27910117
commit e01174182c

View file

@ -317,21 +317,23 @@ var [tj, shorts, playlist, stream, c] = await Promise.all([
if (tj) {
if (continuation) { if (continuation) {
const currentAuthorId = String(cinv.authorId).trim(); const currentAuthorId = String(cinv.authorId).trim();
const firstVideoAuthorId = String(tj.videos[0].authorId).trim(); const firstVideoAuthorId = String(tj.videos[0].authorId).trim();
if (currentAuthorId.localeCompare(firstVideoAuthorId) !== 0) { if (currentAuthorId.localeCompare(firstVideoAuthorId) !== 0) {
res.status(400).send("Continuation does not match the channel :c"); res.status(400).send("Continuation does not match the channel :c");
} return; // Exit the function after sending the response
} }
}
const ChannelFirstVideoObject = await fetch( var ChannelFirstVideoObject = await fetch(
`${config.invapi}/videos/${tj.videos[0].videoId}` `${config.invapi}/videos/${tj.videos[0].videoId}`
) )
.then((res) => res.text()) .then((res) => res.text())
.then((txt) => getJson(txt)); .then((txt) => getJson(txt));
}
renderTemplate(res, req, "channel.ejs", { renderTemplate(res, req, "channel.ejs", {
ID, ID,