mirror of
https://github.com/nadimkobeissi/mkbsd.git
synced 2024-12-22 15:35:11 +00:00
Update mkbsd.js
Add count of images before starting download
This commit is contained in:
parent
82e50c64f0
commit
8ead3ab641
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 New Issue
Block a user