playlist.html: changed display of song time from ms to
minutes:seconds
This commit is contained in:
parent
ff9ef03ed1
commit
2ae9bd5adf
|
@ -1977,7 +1977,15 @@ Rico.LiveGridBuffer.prototype = {
|
|||
var row = [];
|
||||
//,dmap.itemid,,dmap.itemname']
|
||||
['dmap.itemname','daap.songtime','daap.songartist','daap.songalbum','daap.songgenre'].each(function (name) {
|
||||
row.push(el.getElementsByTagName(name)[0].firstChild.nodeValue);
|
||||
if ('daap.songtime' == name) {
|
||||
var time = parseInt(el.getElementsByTagName(name)[0].firstChild.nodeValue);
|
||||
time = Math.round(time / 1000);
|
||||
var seconds = time % 60;
|
||||
seconds = (seconds < 10) ? '0'+seconds : seconds;
|
||||
row.push(Math.floor(time/60)+ ':' + seconds);
|
||||
} else {
|
||||
row.push(el.getElementsByTagName(name)[0].firstChild.nodeValue);
|
||||
}
|
||||
});
|
||||
newRows.push(row);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue