mirror of
https://github.com/reality/dbot.git
synced 2024-12-26 12:42:51 +01:00
fix for below one minite
This commit is contained in:
parent
5bf1e24d02
commit
b9786b1d2f
@ -28,7 +28,7 @@ var youtube = function(dbot) {
|
|||||||
|
|
||||||
this.internalAPI = {
|
this.internalAPI = {
|
||||||
'formatLink': function(v) {
|
'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]) {
|
if(time[2]) {
|
||||||
var seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60),
|
var seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60),
|
||||||
minutes = time[1];
|
minutes = time[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user