From 651d10aec08871ec567a4e503709709d88d7f611 Mon Sep 17 00:00:00 2001 From: unknown <89595418+unknownsrc@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:48:16 +0100 Subject: [PATCH] adding logging in case fail --- utils/auto.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/auto.js b/utils/auto.js index 7a58dce..10d6169 100644 --- a/utils/auto.js +++ b/utils/auto.js @@ -23,6 +23,8 @@ async function handleDownload(channelId) { logger.info({ message: `Checking ${channelId} for new videos...` }) const videos = await metadata.getChannelVideos(channelId) + if (!videos) return logger.info({ message: `Failed requesting Youtube for ${channelId}` }) + for (video of videos) { const id = video.url.match(/[?&]v=([^&]+)/)[1]