id); $images = array(); if (count($songs) > 0) { $last_song = new Song($songs[0]['object_id']); $last_song->format(); $images = self::get_images($last_song->f_artist); } return $images; } protected static function get_images($artist_name) { $images = array(); if (AmpConfig::get('echonest_api_key')) { $echonest = new EchoNest_Client(new EchoNest_HttpClient_Requests()); $echonest->authenticate(AmpConfig::get('echonest_api_key')); try { $images = $echonest->getArtistApi()->setName($artist_name)->getImages(); } catch (Exception $e) { debug_event('echonest', 'EchoNest artist images error: ' . $e->getMessage(), '1'); } } foreach (Plugin::get_plugins('get_photos') as $plugin_name) { $plugin = new Plugin($plugin_name); if ($plugin->load($GLOBALS['user'])) { $images += $plugin->_plugin->get_photos($artist_name); } } return $images; } } // end of Slideshow class