forked from GitHub/dbot
idk
This commit is contained in:
parent
aba5ac4fa5
commit
2483ec1ef6
@ -29,6 +29,7 @@ var youtube = function(dbot) {
|
||||
this.internalAPI = {
|
||||
'formatLink': function(v) {
|
||||
var time = v.contentDetails.duration.match(/^PT(\d+)?M?(\d+)S$/);
|
||||
if(time) {
|
||||
if(time[1]) {
|
||||
var seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60),
|
||||
minutes = time[1];
|
||||
@ -36,6 +37,11 @@ var youtube = function(dbot) {
|
||||
var seconds =((time[1]%60 < 10) ? "0"+time[1]%60 : time[1]%60),
|
||||
minutes = 0;
|
||||
}
|
||||
} else {
|
||||
minutes = 'id';
|
||||
seconds = 'fk';
|
||||
console.log(v.contentDetails.duration);
|
||||
}
|
||||
|
||||
var res = dbot.t('yt_video', {
|
||||
'title': v.snippet.title,
|
||||
|
Loading…
Reference in New Issue
Block a user