fix for below one minite

This commit is contained in:
reality 2015-04-27 09:32:22 +00:00
parent a582600f0f
commit 25347f9006

View File

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