diff --git a/app/assets/javascripts/player.coffee b/app/assets/javascripts/player.coffee index 33120fc..5673929 100644 --- a/app/assets/javascripts/player.coffee +++ b/app/assets/javascripts/player.coffee @@ -88,7 +88,7 @@ class window.Player len = parseInt(audio.duration, 10) m = Math.floor(len / 60) s = len - Math.floor(len / 60) * 60 - duration = m+':'+(s < 10 ? '0' : '')+s + duration = m + ':' + (if s < 10 then '0' else '') + s _session.query '/track/update_length', { track_id: track.id, length: len }, (r) -> if r.result is 'success' $('.playlist li[data-id="'+track.id+'"] .song-duration').text(duration)