Beispiel #1
0
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();

    }
Beispiel #2
0
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;
    }