GithubHelp home page GithubHelp logo

node-nde's Introduction

node-nde

Winamp Media Library / Nullsoft Database Engine (NDE) reader

Use this library to read Winamp's Media Library database. Extract ratings, etc.

Install

$ npm i node-nde

Usage

const path = require('path');
const NDE = require('node-nde');

const ndeReader = NDE.load('main.dat', 'main.idx');

let library = ndeReader.readAll();

Note: main.dat and main.idx can be found in Winamp's Plugins\ml folder.

Example of the result of readAll():

[
  {
    filename: 'C:\\music\\song.mp3',
    title: 'Title',
    artist: 'Artist',
    year: 1986,
    genre: 'Genre',
    comment: '',
    length: 180, // length in sec
    type: 0,
    lastupd: '2016-01-04T21:47:39.000Z',
    lastplay: '2016-01-14T21:34:09.000Z',
    rating: 3,
    playcount: 32,
    filetime: '2010-11-21T14:37:32.000Z',
    filesize: 0,
    bitrate: 256,
    dateadded: '2016-01-04T21:47:39.000Z'
  },
  ...
]

An entry object may contain these properties:

filename title artist album year genre comment trackno length type lastupd lastplay rating tuid2 playcount filetime filesize bitrate disc albumartist replaygain_album_gain replaygain_track_gain publisher composer bpm discs tracks ispodcast podcastchannel podcastpubdate GracenoteFileID GracenoteExtData lossless category codec director producer width height mimetype dateadded

What if I don't have an index (.idx) file?

node-nde can attempt to read the contents of the .dat file if no path to an index file is specified!

const path = require('path');
const NDE = require('node-nde');

const ndeReader = NDE.load('main.dat');

let library = ndeReader.readAll();

Credits

This library's initial version was based on neuralys/nde (PHP).

node-nde's People

Contributors

wiiseguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-nde's Issues

Can you inspect the database using just the main.dat file (without the corresponding main.idx)?

Sorry, this isn't really an issue so much as a question about accessing the database in general.

I lost some music recently in a botched drive migration but was hoping to maybe see what it was that I had lost by trying to inspect my Media Library database.

Unfortunately, my Winamp database updated itself after the migration, so it no longer contains any of the songs I lost. However, there's a backup copy of main.dat from a year ago in the same directory (called something like main.dat.n3w00001A60 with a 40MB file size, so I think it holds valid data) but, alas, there's no accompanying main.idx file that got saved along with it.

Using this library I was able to read my current database just fine, but when I try to pass it the path to the old .dat file, but still using the current .idx file, unsurprisingly it doesn't work.

Do you know offhand how possible it would be to inspect that older copy of the .dat file without its associated .idx file? I don't have much experience working with streams, but I thought I might use your library as a jumping off point to see if I could rig something up and wondered if you might have any suggestions. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.