From 13fadb9e213204a52c1c19265d7e414779ed910a Mon Sep 17 00:00:00 2001 From: unknown <89595418+unknownsrc@users.noreply.github.com> Date: Fri, 24 Mar 2023 17:10:45 +0100 Subject: [PATCH] auto-download duration limit --- utils/auto.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/auto.js b/utils/auto.js index 10d6169..deab7b2 100644 --- a/utils/auto.js +++ b/utils/auto.js @@ -40,6 +40,11 @@ async function handleDownload(channelId) { continue } + if (video.duration > 6300) { + logger.info({ message: `${video.title} is longer than 1h45m, ${id}` }) + continue + } + await redis.set(id, 'downloading') logger.info({ message: `Starting to download ${video.title}, ${id}` })