Skip to content

Commit

Permalink
improve debug msg
Browse files Browse the repository at this point in the history
  • Loading branch information
insanity54 committed Aug 2, 2022
1 parent bcc04ed commit 38d14b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class Download {

const res = [];
logger.info(JSON.stringify(result, 0, 2));
logger.info(`${userId} has ${result.length} videos during this time period.`);
for await (const video of result) {
const clipInfo = {
broadcasterDisplayName: video.broadcasterDisplayName,
Expand All @@ -127,6 +126,8 @@ class Download {
};
res.push(clipInfo);
}
logger.info(`${userId} has ${res.length} videos during this time period.`);


if (res.length < 10) throw new LessThanTenClips(`There were not at least 10 clips for Twitch user ${userId} between ${startDate} and ${endDate}`);
return res;
Expand Down

0 comments on commit 38d14b7

Please sign in to comment.