<phpcode>
<?php
if (class_exists('wp_iTunesSpy')) {
$iTunesSpy = new wp_iTunesSpy();
}
?>
<ul>
<?php
$Out = ''; //Clear the variable
$tracks = $iTunesSpy->getLastTracks(20);
if ($tracks) {
foreach ($tracks as $track) {
// load the track data into the variable
$schema = '<div id="itunes">'; //Clear the variable
$track = $iTunesSpy->getTrack($track->id);
$Out .= $iTunesSpy->getTrackArtEx($track->art_id, '<img ', ' />', 'src="%art_large_url%" width="100px" id="itunescover" alt="%title% - %artist%"');
$schema .= '<b>Title:</b> %title%<br/>';
$schema .= '<b>Künstler:</b> %artist%<br/>';
$schema .= '<b>Genre:</b> %genre%<br/>';
$schema .= '<b>Jahr:</b> %year%<br/>';
$lastplayed = $iTunesSpy->getTrackLastPlayTime($track->id);
$Out .= $iTunesSpy->getTrackInfoEx($track->id, '', '', $schema);
$schema = '</div>'; //Clear the variable
}
echo $Out;
}
?>
</ul>