Skip to content

Commit 45431b6

Browse files
committed
minor fixes
1 parent 6931fc7 commit 45431b6

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

library/audioDataAnalyzer.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,15 @@ analyzer.prototype.getData = function getDataFunction(trackPath, callback) {
129129

130130
ffprobeSpawn.on('error', function(error) {
131131

132-
callback(error);
132+
if (error === 'Error: spawn ENOENT') {
133+
134+
callback('Unable to locate ffprobe, check it is installed and in the path');
135+
136+
} else {
137+
138+
callback(error);
139+
140+
}
133141

134142
});
135143

@@ -320,7 +328,15 @@ analyzer.prototype.getPeaks = function getValuesFunction(trackPath, peaksAmountR
320328

321329
ffmpegSpawn.on('error', function(error) {
322330

323-
callback(error);
331+
if (error === 'Error: spawn ENOENT') {
332+
333+
callback('Unable to locate ffmpeg, check it is installed and in the path');
334+
335+
} else {
336+
337+
callback(error);
338+
339+
}
324340

325341
});
326342

0 commit comments

Comments
 (0)