playlist.html: changed display of song time from ms to

minutes:seconds
This commit is contained in:
Anders Betnér 2006-04-08 20:37:06 +00:00
parent ff9ef03ed1
commit 2ae9bd5adf
1 changed files with 9 additions and 1 deletions

View File

@ -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);
});