1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-11-17 19:14:49 +00:00

Fix: first track in queue listed as number 0 #74

This commit is contained in:
jcorporation 2018-11-15 20:57:00 +00:00
parent b5add0f2f4
commit 13187e4c3a

View File

@ -1480,11 +1480,12 @@ function parseQueue(obj) {
var minutes = Math.floor(obj.data[i].Duration / 60); var minutes = Math.floor(obj.data[i].Duration / 60);
var seconds = obj.data[i].Duration - minutes * 60; var seconds = obj.data[i].Duration - minutes * 60;
obj.data[i].Duration = minutes + ':' + (seconds < 10 ? '0' : '') + seconds; obj.data[i].Duration = minutes + ':' + (seconds < 10 ? '0' : '') + seconds;
obj.data[i].Pos++;
var row = document.createElement('tr'); var row = document.createElement('tr');
row.setAttribute('draggable','true'); row.setAttribute('draggable','true');
row.setAttribute('data-trackid', obj.data[i].id); row.setAttribute('data-trackid', obj.data[i].id);
row.setAttribute('id','queueTrackId' + obj.data[i].id); row.setAttribute('id','queueTrackId' + obj.data[i].id);
row.setAttribute('data-songpos', (obj.data[i].Pos + 1)); row.setAttribute('data-songpos', obj.data[i].Pos);
row.setAttribute('data-duration', obj.data[i].Duration); row.setAttribute('data-duration', obj.data[i].Duration);
row.setAttribute('data-uri', obj.data[i].uri); row.setAttribute('data-uri', obj.data[i].uri);
var tds = ''; var tds = '';