Updated duration fix
This commit is contained in:
parent
83047f5bf0
commit
c22ccab188
|
@ -86,7 +86,9 @@ class window.Player
|
|||
console.log(track)
|
||||
if track.length == 0
|
||||
len = parseInt(audio.duration, 10)
|
||||
duration = Math.floor(len / 60)+':'+(len - Math.floor(len / 60) * 60)
|
||||
m = Math.floor(len / 60)
|
||||
s = len - Math.floor(len / 60) * 60
|
||||
duration = m+':'+(s < 10 ? '0' : '')+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)
|
||||
|
|
Loading…
Reference in New Issue