Browse Source

songprovider: timeToSeconds

master
vampirefrog 12 months ago
parent
commit
5c96f2013d
  1. 5
      songprovider.js

5
songprovider.js

@ -6,6 +6,11 @@ class SongProvider {
getInfo(url, cb) {
cb(null);
}
timeToSeconds(t) {
let components = t.split(':').reverse();
return parseInt(components[0]||0) + (parseInt(components[1]||0) + (parseInt(components[2]||0) * 60)) * 60;
}
}
module.exports = SongProvider;

Loading…
Cancel
Save