mirror of
https://github.com/nadimkobeissi/mkbsd.git
synced 2024-12-04 16:57:47 -05:00
Update mkbsd.js
Add count of images before starting download
This commit is contained in:
parent
82e50c64f0
commit
8ead3ab641
1 changed files with 4 additions and 0 deletions
4
mkbsd.js
4
mkbsd.js
|
@ -19,6 +19,10 @@ async function main() {
|
|||
if (!data) {
|
||||
throw new Error('⛔ JSON does not have a "data" property at its root.');
|
||||
}
|
||||
|
||||
const count = data ? Object.keys(data).length : 0;
|
||||
console.info(`Found ${count} images..`);
|
||||
|
||||
const downloadDir = path.join(__dirname, 'downloads');
|
||||
if (!fs.existsSync(downloadDir)) {
|
||||
fs.mkdirSync(downloadDir);
|
||||
|
|
Loading…
Reference in a new issue