void EchoNestPlugin::getArtistBiographySlot() { QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() ); Echonest::Artist artist = artistFromReply( reply ); BiographyList biographies = artist.biographies(); InfoGenericMap biographyMap; Q_FOREACH(const Biography& biography, biographies) { biographyMap[biography.site()]["site"] = biography.site(); biographyMap[biography.site()]["url"] = biography.url().toString(); biographyMap[biography.site()]["text"] = biography.text(); biographyMap[biography.site()]["attribution"] = biography.license().attribution; biographyMap[biography.site()]["licensetype"] = biography.license().type; biographyMap[biography.site()]["attribution"] = biography.license().url.toString(); }
void EchonestPlugin::getArtistBiographySlot() { QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() ); Echonest::Artist artist = artistFromReply( reply ); Echonest::BiographyList biographies = artist.biographies(); QVariantMap biographyMap; Q_FOREACH( const Echonest::Biography& biography, biographies ) { QVariantHash siteData; siteData[ "site" ] = biography.site(); siteData[ "url" ] = biography.url().toString(); siteData[ "text" ] = biography.text(); siteData[ "attribution" ] = biography.license().attribution; siteData[ "licensetype" ] = biography.license().type; biographyMap[ biography.site() ] = siteData; }
QDebug Echonest::operator<<(QDebug d, const Echonest::Artist& artist) { return d.maybeSpace() << QString::fromLatin1( "Artist(%1, %2)" ).arg( artist.name() ).arg( QString::fromLatin1(artist.id()) ); }