mirror of
https://github.com/reality/dbot.git
synced 2025-01-13 13:42:40 +01:00
fix for below one minite
This commit is contained in:
parent
ea07d55b9e
commit
a582600f0f
@ -28,9 +28,13 @@ 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]) {
|
||||||
seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60),
|
seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60),
|
||||||
minutes = time[1];
|
minutes = time[1];
|
||||||
|
} else {
|
||||||
|
seconds =((time[1]%60 < 10) ? "0"+time[1]%60 : time[1]%60),
|
||||||
|
}
|
||||||
|
|
||||||
var res = dbot.t('yt_video', {
|
var res = dbot.t('yt_video', {
|
||||||
'title': v.snippet.title,
|
'title': v.snippet.title,
|
||||||
|
Loading…
Reference in New Issue
Block a user