New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

media-library

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

media-library

a media library (indexer and search/browse api)

  • 1.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
increased by250%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status NPM version npm downloads

Installation

$ npm install media-library

Usage

var MediaLibary = require('media-library');
var library = new MediaLibrary({
  // persistent storage location (optional)
  dataPath: './',
  // the paths to scan
  paths: [ 'C:\\data\\music', 'C:\\Users\\me\\music' ]
});

// Scanning files (only needed at first start and when paths are added)
library.scan()
.on('track', (track) => {
  console.log(`track: ${track.artist} - ${track.title}`);
})
.on('done', () => {
    // listing all tracks
    library.tracks((err, tracks) => console.log(tracks));

    // listing artists  
    library.artists((err, tracks) => console.log(tracks));

    // searching tracks
    library.find({ artist: 'radiohead', title: 'ok' }, (err, tracks) => {
        console.log(tracks);
    });
});

todo

  • Handle compilations

    Could auto detect by AlbumArtist and/or heuristic + manual setting

Keywords

FAQs

Package last updated on 05 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc