Update src/libpoketube/init/pages-channel-and-download.js

This commit is contained in:
ashley 2024-08-17 19:13:24 +00:00
parent 9c77e01076
commit c53d1a57c9

View file

@ -269,14 +269,23 @@ module.exports = function (app, config, renderTemplate) {
getChannelData(channelINVUrl), getChannelData(channelINVUrl),
]); ]);
var bannedchannels = ["UC1okSIA8UEY8OqvtjGHFvzA"]
if(ID.includes(bannedchannels)) { var bannedchannels = ["UC1okSIA8UEY8OqvtjGHFvzA"];
var bypassQuery = "cG9rZXR1YmVjaGFubmVsYnlwYXNzbG9scGVvcGxldGhpbmt0aGlzaXNjZW5zb3JzaGlwLTQ1OTBh";
var bypassExists = req.query.bypass === bypassQuery;
var tabExists = 'tab' in req.query;
var continuationExists = 'continuation' in req.query;
if (ID.includes(bannedchannels) && !bypassExists && !tabExists && !continuationExists) {
var cinv = { var cinv = {
error: "banned from poke for violating code of conduct. you can still watch content but u cant view the channel itself!" error = `this channel was banned for violating the code of conduct. You can still watch content but cannot view the channel itself. If you still wanna view content <a href="?bypass=${bypassQuery}">click here</a> to bypass this restriction.`;
} }
} }
function getThumbnailUrl(video) { function getThumbnailUrl(video) {
const maxresDefaultThumbnail = video.videoThumbnails.find( const maxresDefaultThumbnail = video.videoThumbnails.find(
(thumbnail) => thumbnail.quality === "maxresdefault" (thumbnail) => thumbnail.quality === "maxresdefault"