I have an Electron app that gets the path to audio files on the user's machine. I'm trying to use music-metadata
NPM package to get metadata from a audio file (mp3), specifically the track number metadata. I installed the package and my code below is based on the examples published on the package's website:
const mm = require('music-metadata');
const util = require('util');
console.log('path.sep = ', path.sep);
mm.parseFile("C:\\Users\\marti\\Documents\\martinradio\\uploads\\VA-IF1987L\\Gastunk - The Birth Of Stars.mp3")
.then( metadata => {
console.log('metadata')
console.log(util.inspect(metadata, { showHidden: false, depth: null }));
})
.catch( err => {
console.log('err')
console.error(err.message);
});
console.log('ending get metadata')
However, the call to mm.parseFile
neither succeeds nor fails, it is just being skipped over, as can be seen in this screenshot:
Just a little further down I get some error messages stating 'DevTools failed to load SourceMap: Could not load content for ...', as can be seen in this screenshot: