adding logging in case fail

This commit is contained in:
unknown 2023-03-24 16:48:16 +01:00
parent d36f586acd
commit 651d10aec0
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@ async function handleDownload(channelId) {
logger.info({ message: `Checking ${channelId} for new videos...` }) logger.info({ message: `Checking ${channelId} for new videos...` })
const videos = await metadata.getChannelVideos(channelId) const videos = await metadata.getChannelVideos(channelId)
if (!videos) return logger.info({ message: `Failed requesting Youtube for ${channelId}` })
for (video of videos) { for (video of videos) {
const id = video.url.match(/[?&]v=([^&]+)/)[1] const id = video.url.match(/[?&]v=([^&]+)/)[1]