From 25347f9006889bee56edb38d120fb2b52e727209 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 27 Apr 2015 09:32:22 +0000 Subject: [PATCH] fix for below one minite --- modules/youtube/youtube.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/youtube/youtube.js b/modules/youtube/youtube.js index a1f6dcb..28a86fb 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -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', {