diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..28a804d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LICENSE.md b/LICENSE.md
deleted file mode 100644
index cd545a2..0000000
--- a/LICENSE.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# The MIT License (MIT)
-**Copyright (c) 2017 Daniel Sommer **
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
deleted file mode 100644
index afe15c9..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# badger-am
diff --git a/lib/audio.js b/lib/audio.js
index 8ab68d1..0dd5097 100644
--- a/lib/audio.js
+++ b/lib/audio.js
@@ -33,15 +33,20 @@ function batchConvert(config, callback) {
// process each file
function (files, bar, waterfallCallback) {
timestamp = process.hrtime();
+ let errors = [];
async.eachLimit(files, config.concurrency, function (file, eachCallback) {
convert(file, config, function (err) {
bar.tick();
if (err) {
- return eachCallback(err);
+ err.file = file;
+ errors.push(err);
}
eachCallback();
});
}, function (err, result) {
+ errors.forEach(function(error) {
+ console.error('error converting file: \'' + error.file + '\'', error);
+ });
if (err) {
return waterfallCallback(err);
}
@@ -198,6 +203,7 @@ function extractMetadata(source, callback) {
const stream = fs.createReadStream(source);
metadata(stream, function (err, metadata) {
if (err) {
+ console.error('ERROR AT FILE: ' + source);
return callback(err);
}
stream.close();
diff --git a/package-lock.json b/package-lock.json
index 6f2089e..40e5ded 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz",
"integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==",
"requires": {
- "lodash": "4.17.4"
+ "lodash": "^4.14.0"
}
},
"balanced-match": {
@@ -22,7 +22,7 @@
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
"integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
"requires": {
- "balanced-match": "1.0.0",
+ "balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
@@ -54,8 +54,8 @@
"resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz",
"integrity": "sha1-yVLeIkD4EuvaCqgAbXd27irPfXQ=",
"requires": {
- "async": "2.5.0",
- "which": "1.3.0"
+ "async": ">=0.2.9",
+ "which": "^1.1.1"
}
},
"fs-extra": {
@@ -63,9 +63,9 @@
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz",
"integrity": "sha1-f8DGyJV/mD9X8waiTlud3Y0N2IA=",
"requires": {
- "graceful-fs": "4.1.11",
- "jsonfile": "3.0.1",
- "universalify": "0.1.1"
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^3.0.0",
+ "universalify": "^0.1.0"
}
},
"graceful-fs": {
@@ -93,7 +93,7 @@
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz",
"integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=",
"requires": {
- "graceful-fs": "4.1.11"
+ "graceful-fs": "^4.1.6"
}
},
"lodash": {
@@ -106,7 +106,7 @@
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
"integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=",
"requires": {
- "brace-expansion": "1.1.8"
+ "brace-expansion": "^1.0.0"
}
},
"musicmetadata": {
@@ -115,10 +115,10 @@
"integrity": "sha1-eukQ2Z+67gXyvVQ67xC2++Hze9Q=",
"requires": {
"deep-equal": "0.2.1",
- "filereader-stream": "0.2.0",
- "is-stream": "1.1.0",
- "strtok2": "1.0.4",
- "through": "2.3.8"
+ "filereader-stream": "^0.2.0",
+ "is-stream": "^1.1.0",
+ "strtok2": "~1.0.0",
+ "through": "~2.3.4"
}
},
"progress": {
@@ -154,7 +154,7 @@
"resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
"integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
"requires": {
- "isexe": "2.0.0"
+ "isexe": "^2.0.0"
}
}
}