album-exif-analyzer
Advanced tools
Comparing version 1.0.3 to 1.0.4
22
index.js
@@ -20,4 +20,11 @@ #!/usr/bin/env node | ||
let exifData; | ||
let numProcessing = 0; | ||
filestream.on("end", () => { | ||
filestream.on("end", async () => { | ||
while (numProcessing > 0) { | ||
await new Promise((resolve) => { | ||
setTimeout(resolve, 100); | ||
}); | ||
} | ||
if (header && exifData.length > 0) { | ||
@@ -47,5 +54,12 @@ fs.writeFileSync(outputFile, header); | ||
filestream.on("data", async (entry) => { | ||
console.log(entry.path); | ||
const data = await exif.read(entry.path); | ||
numProcessing++; | ||
let data; | ||
try { | ||
data = await exif.read(entry.path); | ||
} catch (e) { | ||
numProcessing--; | ||
return; | ||
} | ||
if (data === null) { | ||
numProcessing--; | ||
return; | ||
@@ -59,3 +73,2 @@ } | ||
header = exifKeys.join(separator) + "\n"; | ||
console.log("here"); | ||
exifData = Array(exifKeys.length); | ||
@@ -70,2 +83,3 @@ for (let i = 0; i < exifKeys.length; i++) { | ||
} | ||
numProcessing--; | ||
}); |
{ | ||
"name": "album-exif-analyzer", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Recursively extracts EXIF data of all of the photos in a directory into a analyzable format", | ||
@@ -11,2 +11,3 @@ "main": "index.js", | ||
"fast-exif": "^1.0.1", | ||
"lock": "^1.1.0", | ||
"readdirp": "^3.0.2" | ||
@@ -13,0 +14,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3758
70
3
+ Addedlock@^1.1.0
+ Addedlock@1.1.0(transitive)