3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 03:33:07 +01:00

fix ternary and [close [#585]]

This commit is contained in:
reality 2013-10-08 14:51:44 +00:00
parent e43ead6832
commit f87f6a37d4

View File

@ -27,7 +27,7 @@ var youtube = function(dbot) {
var v = body.feed.entry[0],
seconds = v['media$group']['yt$duration'].seconds,
minutes = Math.floor(seconds / 60),
seconds%60 < 10 ? seconds="0"+seconds%60 : seconds=seconds%60;
seconds = ((seconds%60 < 10) ? "0"+seconds%60 : seconds%60);
if(!_.has(v, 'yt$rating')) {
v['yt$rating'] = {
@ -68,7 +68,7 @@ var youtube = function(dbot) {
var v = body.entry
seconds = v['media$group']['yt$duration'].seconds,
minutes = Math.floor(seconds / 60),
seconds%60 < 10 ? seconds="0"+seconds%60 : seconds=seconds%60;
seconds = ((seconds%60 < 10) ? "0"+seconds%60 : seconds%60);
if(!_.has(v, 'yt$rating')) {
v['yt$rating'] = {