From 57a2a128142dd6fcac2df956bc25be124e09571e Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 20 Apr 2015 20:16:03 +0000 Subject: [PATCH] fix seconds counter (thanks trapdoor) --- modules/youtube/youtube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/youtube/youtube.js b/modules/youtube/youtube.js index 0087cab..9238381 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -29,7 +29,7 @@ var youtube = function(dbot) { this.internalAPI = { 'formatLink': function(v) { var time = v.contentDetails.duration.match(/^PT(\d+)M(\d+)S$/), - seconds = time[2], + seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60), minutes = time[1]; var res = dbot.t('yt_video', {