Unable to load recently played tracks.'; exit; } if (!$tracks) { echo 'Nothing played yet. Tracks will appear here once the show is under way.'; exit; } foreach ($tracks as $t) { // Album art and album title link to the album on Last.fm $albumUrl = ($t['artist'] !== '' && $t['album'] !== '') ? lastfmAlbumUrl($t['artist'], $t['album']) : ''; $openLink = $albumUrl !== '' ? '' : ''; $closeLink = $albumUrl !== '' ? '' : ''; // Stored in UTC; live.php reformats this in the listener's local time $iso = str_replace(' ', 'T', $t['played_at']) . 'Z'; $fallback = substr($t['played_at'], 11, 5) . ' UTC'; echo ''; echo '' . ($t['art_url'] !== '' ? $openLink . 'Album art for ' . e($t['album']) . '' . $closeLink : '') . ''; echo ''; echo '' . e($t['title']) . ''; echo '' . e($t['artist']) . ''; echo '' . $openLink . e($t['album']) . $closeLink . ''; echo ''; }