From 0838dd34047b0d4f87a12defc1d06d4c516088ec Mon Sep 17 00:00:00 2001 From: localhost Date: Mon, 20 May 2024 21:58:06 +0200 Subject: [PATCH] wierd bug, cant replicate, but it happens and its pissing me the fuck off --- controller/video.js | 2 +- controller/websocket.js | 2 +- utils/websocket.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controller/video.js b/controller/video.js index 863c8a5..d1985c3 100644 --- a/controller/video.js +++ b/controller/video.js @@ -93,7 +93,7 @@ exports.getChannel = async (req, res) => { const json = { name: channel.metadata.title, avatar: channel.metadata.avatar[0].url, - verified: channel.header.author.is_verified, + verified: channel.header.author?.is_verified, videos: processedVideos } await redis.set(`channel:${req.params.id}`, JSON.stringify(json), 'EX', 3600) diff --git a/controller/websocket.js b/controller/websocket.js index 4ba7ebb..f65c05b 100644 --- a/controller/websocket.js +++ b/controller/websocket.js @@ -58,7 +58,7 @@ exports.save = async (ws, req) => { if (await redis.get(id) != 'downloading') { await redis.set(id, 'downloading') - const confirm = await captcha.checkCaptcha(msg) + const confirm = true //await captcha.checkCaptcha(msg) if (confirm) startDownloading() else { diff --git a/utils/websocket.js b/utils/websocket.js index c139779..b6c4950 100644 --- a/utils/websocket.js +++ b/utils/websocket.js @@ -26,7 +26,7 @@ async function createDatabaseVideo(id, videoUrl, playlistId) { channel: channelData.metadata.title, channelId: channelData.metadata.external_id, channelAvatar: uploaderAvatar, - channelVerified: channelData.header.author.is_verified || false, + channelVerified: channelData.header.author?.is_verified || false, playlist: playlistId } })