node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey ยป



This is mainly for when a file, or folder is created from a torrent download to determine what 'type' it is.

The currently the types are 'movie', 'audio'. More can be added.


var info = require('media-folder-info');
info('/home/you/downloads/folder', function(err, data){
  if (err) return console.log(err);
  console.log(data.type); // 'video', 'audio',
  console.log(data.files); // the main file(s), eg '/home/you/downloads/folder/movie-1999.avi'

see the tests folder for more info