Comparing version 0.0.6 to 0.0.8
12
album.js
@@ -78,7 +78,11 @@ const Batch = require('batch') | ||
format: { | ||
bitDepth: this.query().every((tr, i, arr) => tr.format.bitDepth === arr[0].format.bitDepth), | ||
channels: this.query().every((tr, i, arr) => tr.format.channels === 2), | ||
sampleRate: this.query().every((tr, i, arr) => tr.format.sampleRate === arr[0].format.sampleRate) | ||
bitDepth: this.query() | ||
.every((tr, i, arr) => tr.format.bitDepth === arr[0].format.bitDepth), | ||
channels: this.query() | ||
.every((tr, i, arr) => tr.format.channels === 2), | ||
sampleRate: this.query() | ||
.every((tr, i, arr) => tr.format.sampleRate === arr[0].format.sampleRate) | ||
}, | ||
silences: this.query().every(tr => tr.silences.start && tr.silences.end) | ||
silences: this.query() | ||
.every(tr => tr.silences.start && tr.silences.end) | ||
} | ||
@@ -85,0 +89,0 @@ |
@@ -6,2 +6,3 @@ const Album = require('./album') | ||
const Track = require('./track') | ||
const fingerprint = require('./fingerprint') | ||
const flags = require('./flags.json') | ||
@@ -17,3 +18,3 @@ const soxi = require('./soxi') | ||
Album, Asset, CD, CoverArt, Digital, Download, Master, Premaster, Release, | ||
Stream, Track, Vinyl, flags, soxi, stats, spectrogram | ||
Stream, Track, Vinyl, fingerprint, flags, soxi, stats, spectrogram | ||
} |
{ | ||
"name": "baptism", | ||
"version": "0.0.6", | ||
"version": "0.0.8", | ||
"description": "", | ||
@@ -16,2 +16,3 @@ "main": "index.js", | ||
"fluent-ffmpeg": "^2.1.2", | ||
"fpcalc": "^1.3.0", | ||
"little-process-box": "^0.2.3", | ||
@@ -18,0 +19,0 @@ "mime": "^2.4.6", |
@@ -24,2 +24,8 @@ # SACRED1: Baptism | ||
### Dependencies | ||
This module utilizes some open source and/or GPL command line media processing | ||
tools. It expects there to be binaries for `ffmpeg` and `sox` inside the user's | ||
`PATH`. | ||
## Example | ||
@@ -209,2 +215,7 @@ | ||
#### `track.fingerprint(callback)` | ||
Generates a buffer of the raw fpcalc audio fingerprint for the `Track`. Writes | ||
the data to `Track.fp` as a buffer. Callback returns the fingerprint buffer. | ||
#### `track.size(callback)` | ||
@@ -211,0 +222,0 @@ |
13
track.js
const { Asset } = require('./asset') | ||
const debug = require('debug')('baptism:track') | ||
const fingerprint = require('./fingerprint') | ||
const flags = require('./flags.json') | ||
@@ -63,2 +64,14 @@ const ffmpeg = require('fluent-ffmpeg') | ||
fingerprint (cb) { | ||
this.open((err) => { | ||
if (err) return cb(err) | ||
if (!this.active(cb)) return | ||
fingerprint(this.filename, (err, fp) => { | ||
if (err) return cb(err) | ||
this.fp = fp | ||
this.inactive(cb, null, fp) | ||
}) | ||
}) | ||
} | ||
silence (cb) { | ||
@@ -65,0 +78,0 @@ this.open((err) => { |
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
1791186
16
585
258
10
0
+ Addedfpcalc@^1.3.0
+ Addedbuffer-from@1.1.2(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedduplexer@0.1.2(transitive)
+ Addedevent-stream@3.3.5(transitive)
+ Addedfpcalc@1.3.0(transitive)
+ Addedfrom@0.1.7(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmap-stream@0.0.7(transitive)
+ Addedpause-stream@0.0.11(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsplit@1.0.1(transitive)
+ Addedstream-combiner@0.2.2(transitive)
+ Addedstream-filter@1.0.0(transitive)
+ Addedstream-reduce@1.0.3(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtypedarray@0.0.6(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedstring_decoder@1.3.0(transitive)