Commit 52798a73 authored by Mike Sheldon's avatar Mike Sheldon

Give track duration in mm:ss instead of just seconds

parent 1219b5d4
......@@ -59,6 +59,13 @@ foreach($res as &$trow) {
}
}
// Give the duration in MM:SS
$mins = floor($track->duration / 60);
$sec = floor($track->duration % 60);
if (strlen($sec) == 1) { $sec = "0" . $sec; }
$duration = $mins . ":" . $sec;
$smarty->assign('duration', $duration);
$smarty->assign('albums', $aOtherAlbums);
$smarty->assign('extra_head_links', array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment