1.0.1 • Published 9 years ago

node-osdb-hash v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

Opensubtitles API (OSDb protocol) Hash Implementation

Implementation of the OSDb hash in nodejs, for use with Opensubtitles Database (OSDb)

Installation

$ npm install node-osdb-hash

Usage

Synchronous

var osh = require('node-osdb-hash');
var hash = osh.hashSync('/path/to/movie/file');
console.log(hash); // Eg : '8e245d9679d31e12'

Asynchronous

var osh = require('node-osdb-hash');
osh.hash('/path/to/movie/file', function (err, hash) {
	if(err) return console.error(err);
	console.log(hash); // Eg : '8e245d9679d31e12'
}

Using Events

var osh = require('node-osdb-hash');
var hasher = osh.hash('/path/to/movie/file');
hasher.on('hashReady', function (hash){
	console.log(hash); // Eg : '8e245d9679d31e12'
}
hasher.on('error', function (err) {
	console.error(err);
}
hasher.calculateHash();
1.0.1

9 years ago

1.0.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago