3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-26 04:32:37 +01:00

fix for below one minite

This commit is contained in:
reality 2015-04-27 09:51:45 +00:00
parent b9786b1d2f
commit 10f853c921

View File

@ -29,7 +29,7 @@ var youtube = function(dbot) {
this.internalAPI = {
'formatLink': function(v) {
var time = v.contentDetails.duration.match(/^PT(\d+)?M?(\d+)S$/);
if(time[2]) {
if(time[1]) {
var seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60),
minutes = time[1];
} else {