diff --git a/ajax/ajax_listsongs.php b/ajax/ajax_listsongs.php index 7d4d70a..4203547 100644 --- a/ajax/ajax_listsongs.php +++ b/ajax/ajax_listsongs.php @@ -29,19 +29,17 @@ $sth->execute(); $data['volume'] = getSystemVolume(); system("HOME=" . WEBUSERHOMEDIR . " && ../scripts/homeaudio_togglemute.pl -show", $retval); $data['muted'] = ($retval == 0) ? false : true; -$data['songplaying'] = ""; +$data['currentsong'] = array("art"=>"", "title"=>"", "artist"=>"", "album"=>"", "year"=>""); $data['songlist'] = ""; $firstsong = true; while ( $row = $sth->fetch() ) { $song = new Song($row['songid']); if ( $firstsong ) { - $data['songplaying'] .= "
\n"; - $data['songplaying'] .= " \n"; + $data['currentsong']["art"] = $song->getArtFile(ARTURL); + $data['currentsong']["title"] = $song->getTitle(HTMLSAFE); + $data['currentsong']["artist"] = $song->getArtist(HTMLSAFE); + $data['currentsong']["album"] = $song->getAlbum(HTMLSAFE); + $data['currentsong']["year"] = $song->getYear(HTMLSAFE); $firstsong = false; } else { $data['songlist'] .= "