Comparing version 1.0.6 to 1.1.0
11
index.js
@@ -26,3 +26,3 @@ /* jshint node:true */ | ||
run(args) | ||
run(args, options) | ||
.on("error", callback) | ||
@@ -35,3 +35,3 @@ .pipe(parse()) | ||
var fpcalc = require("child_process").spawn.bind(null, "fpcalc"), | ||
var spawn = require("child_process").spawn, | ||
es = require("event-stream"), | ||
@@ -44,6 +44,9 @@ concat = require("concat-stream"), | ||
// or an error event if an error occurs | ||
function run(args) { | ||
function run(args, options) { | ||
var | ||
// The command to run | ||
command = options.command || "fpcalc", | ||
// Start the fpcalc child process | ||
cp = fpcalc(args), | ||
cp = spawn(command, args), | ||
@@ -50,0 +53,0 @@ // Create the stream that we will eventually return. This stream |
{ | ||
"name": "fpcalc", | ||
"version": "1.0.6", | ||
"version": "1.1.0", | ||
"description": "Calculate AcoustID audio fingerprint", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,6 +25,7 @@ # node-fpcalc | ||
*Options* may be an object with the following keys: | ||
*Options* may be an object with any of the following keys: | ||
* `length`: Length of the audio data used for fingerprint calculation | ||
(passed as `-length` option) | ||
* `command`: Path to the fpcalc command to use (defaults to `"fpcalc"`) | ||
@@ -31,0 +32,0 @@ *Callback* must be a function that will be called with `callback(err, |
@@ -15,3 +15,3 @@ /* jshint node:true */ | ||
t.ok(result.duration); | ||
t.equal(result.fingerprint, "AQAAT2bCawriI7l83FEc7BF-vN3xhQqeSEcTKugv_OHw48lBTj9ybN9EXEdSJSGuFXe-oUGVX7gUNExiBmXnQ-MD_5hy7rgF_vCYXGD0HD-m_8jLQt6R58TH5YCXnQhPaHmOPBHOHH9g6UZ8JoHybwh9HUws4zr4C-E7JMuJOeRxCvdkhJsSHcni_Dhx_MfX40cdX8gjQrmFnCduZYZ_EZMShhp2kUUzpTkaLmxx0iGaG1WmBGeyeQABmAAECQMYE4AwY4FSQnBCJAPIEAIEAEI4IgQhxBoCmDEGIEIAMggCAxQSgCgHjAOAAGAEcEQoQyxQRBEDEBCACAA"); | ||
t.ok(result.fingerprint); | ||
t.end(); | ||
@@ -18,0 +18,0 @@ }); |
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
119
48
203962