GetPlaylist();
if ( is_null($pl) ) echo "ERROR: " .$myMpd->errStr."\n";
else {
$maxlen = strlen(count($pl));
foreach ($pl as $id => $entry) {
$tblClass = ( $id == $myMpd->current_track_id ? "SongPlaying" : "Song" );
$track = $id+1;
// Make all number lengths equal
$len = strlen($track);
while ($len < $maxlen) {
$track = "0" . $track;
$len++;
}
$song_name = truncate_with_ellipse($entry['Artist'],conf('ellipse_threshold_artist')-3) . " - " . truncate_with_ellipse($entry['Title'],conf('ellipse_threshold_title')-3);
echo "\t";
echo "[" . $track . "]";
echo " $song_name";
echo " \n";
}
}
if ( $myMpd->playlist_count == 0 ) {
echo "(Playlist is empty) \n";
}
?>
|
playlist_count > 0 ) { ?>