43081j / id3

A JavaScript ID3 tags parser for Node & browsers.
MIT License
335 stars 63 forks source link

DeprecationWarning: Calling an asynchronous function without callback is deprecated #33

Closed amirping closed 5 years ago

amirping commented 6 years ago

i got problem with id3js when i try to get tags i ask the question on stack you can check it here and i solve it by changing thsose lines

fs.open(self.file, 'r', function(err, fd) {
                        if(err) {
                            return callback(err);
                        }
                        self.fd = fd;
                        callback();
                    }); 

to

fs.openSync(self.file, 'r', function(err, fd) {
                        if(err) {
                            return callback(err);
                        }
                        self.fd = fd;
                        callback();
                    });