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() const channels = await prisma.autodownload.findMany()
channels.forEach(async (c) => { channels.forEach(async (c) => {
if (await redis.get(c.channel)) { channelQueue.createJob(c).save()
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 return
} }
if (video.duration > 7200) { if (video.duration > 1800) {
logger.info({ message: `${video.title} is longer than 2h, ${id}` }) logger.info({ message: `${video.title} is longer than 30m, ${id}` })
return return
} }

View File

@ -90,7 +90,7 @@ async function getChannelVideos(id) {
})).json() })).json()
videos.push(...page.relatedStreams) 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) if (page.nextpage) await getNextPage(page.nextpage)
else return resolve(videos) else return resolve(videos)
} }