From b9786b1d2fc27cc8a7e964589f1edb20b6692f60 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 27 Apr 2015 09:50:51 +0000 Subject: [PATCH] fix for below one minite --- 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 4943c5b..5fc7577 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -28,7 +28,7 @@ var youtube = function(dbot) { this.internalAPI = { 'formatLink': function(v) { - var time = v.contentDetails.duration.match(/^PT(\d+)M(\d+)S$/); + var time = v.contentDetails.duration.match(/^PT(\d+)?M?(\d+)S$/); if(time[2]) { var seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60), minutes = time[1];