local-video-library

build your local library object with automagic metadata grabbing

Usage no npm install needed!

<script type="module">
  import localVideoLibrary from 'https://cdn.skypack.dev/local-video-library';
</script>

README

local-video-library

Finds files in your local disk drives and populates each of them with metadata (from Trakt.tv).

Install

npm install local-video-library

Usage

console.time('test');

const traktId = <trakt.tv client_id>;
const paths = ['/foo/bar'];
const debug = true;

const Parser = require('local-video-library');
const library = new Parser(traktId, paths, debug);

library.scan(paths).then((localLibrary) => {
    console.log('results', localLibrary);
    console.timeEnd('test');
})

You can store localLibrary as you wish. To update without having to rescan everything and avoid making new calls to Trakt, use:

library.update(localLibrary).then(console.log);

License

The MIT license - Jean van Kasteel vankasteelj@gmail.com