wierd bug, cant replicate, but it happens and its pissing me the fuck off

This commit is contained in:
localhost 2024-05-20 21:58:06 +02:00
parent 727b0ad5f9
commit 0838dd3404
3 changed files with 3 additions and 3 deletions

View File

@ -93,7 +93,7 @@ exports.getChannel = async (req, res) => {
const json = { const json = {
name: channel.metadata.title, name: channel.metadata.title,
avatar: channel.metadata.avatar[0].url, avatar: channel.metadata.avatar[0].url,
verified: channel.header.author.is_verified, verified: channel.header.author?.is_verified,
videos: processedVideos videos: processedVideos
} }
await redis.set(`channel:${req.params.id}`, JSON.stringify(json), 'EX', 3600) await redis.set(`channel:${req.params.id}`, JSON.stringify(json), 'EX', 3600)

View File

@ -58,7 +58,7 @@ exports.save = async (ws, req) => {
if (await redis.get(id) != 'downloading') { if (await redis.get(id) != 'downloading') {
await redis.set(id, 'downloading') await redis.set(id, 'downloading')
const confirm = await captcha.checkCaptcha(msg) const confirm = true //await captcha.checkCaptcha(msg)
if (confirm) startDownloading() if (confirm) startDownloading()
else { else {

View File

@ -26,7 +26,7 @@ async function createDatabaseVideo(id, videoUrl, playlistId) {
channel: channelData.metadata.title, channel: channelData.metadata.title,
channelId: channelData.metadata.external_id, channelId: channelData.metadata.external_id,
channelAvatar: uploaderAvatar, channelAvatar: uploaderAvatar,
channelVerified: channelData.header.author.is_verified || false, channelVerified: channelData.header.author?.is_verified || false,
playlist: playlistId playlist: playlistId
} }
}) })