even lower...

This commit is contained in:
localhost 2024-03-12 19:59:31 +01:00
parent f07c4becf2
commit 2d739119e7
2 changed files with 4 additions and 9 deletions

View File

@ -42,12 +42,7 @@ async function check() {
const channels = await prisma.autodownload.findMany()
channels.forEach(async (c) => {
if (await redis.get(c.channel)) {
logger.info({ message: `${c.channel} is already being downloaded` })
} else {
await redis.set(c.channel, 'downloading')
channelQueue.createJob(c).save()
}
})
}
@ -77,8 +72,8 @@ async function checkChannel(channelId) {
return
}
if (video.duration > 7200) {
logger.info({ message: `${video.title} is longer than 2h, ${id}` })
if (video.duration > 1800) {
logger.info({ message: `${video.title} is longer than 30m, ${id}` })
return
}

View File

@ -90,7 +90,7 @@ async function getChannelVideos(id) {
})).json()
videos.push(...page.relatedStreams)
if (videos.length >= 30) return resolve(videos.slice(0,5))
if (videos.length >= 30) return resolve(videos.slice(0,1))
if (page.nextpage) await getNextPage(page.nextpage)
else return resolve(videos)
}