mirror of
https://github.com/reality/dbot.git
synced 2025-01-11 12:32:36 +01:00
missing data fix for youtube
This commit is contained in:
parent
e3b35adb1c
commit
b1916d6043
@ -65,6 +65,10 @@ var youtube = function(dbot) {
|
|||||||
'numDislikes': 0
|
'numDislikes': 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if(!_.has(v, 'yt$statistics')) {
|
||||||
|
v['yt$statistics'] = { 'viewCount': 0 };
|
||||||
|
}
|
||||||
|
|
||||||
callback(dbot.t('yt_video', {
|
callback(dbot.t('yt_video', {
|
||||||
'title': v.title['$t'],
|
'title': v.title['$t'],
|
||||||
'plays': v['yt$statistics'].viewCount,
|
'plays': v['yt$statistics'].viewCount,
|
||||||
|
Loading…
Reference in New Issue
Block a user