1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-16 11:04:01 +02:00

* Added ArtistInfoWidget, our new Artist page and ViewManager's default show(artist) action.

This commit is contained in:
Christian Muehlhaeuser
2011-07-03 02:18:28 +02:00
parent 8017bcacc7
commit dc095ec963
28 changed files with 832 additions and 105 deletions

View File

@@ -116,6 +116,13 @@ Artist::getTopTags() const
}
QNetworkReply*
Artist::getTopTracks() const
{
return ws::get( params("getTopTracks") );
}
QNetworkReply*
Artist::getSimilar() const
{
@@ -154,6 +161,25 @@ Artist::getSimilar( QNetworkReply* r )
}
QStringList /* static */
Artist::getTopTracks( QNetworkReply* r )
{
QStringList tracks;
try
{
XmlQuery lfm = ws::parse(r);
foreach (XmlQuery e, lfm.children( "track" ))
{
tracks << e["name"].text();
}
}
catch (ws::ParseError& e)
{
qWarning() << e.what();
}
return tracks;
}
QList<Artist> /* static */
Artist::list( QNetworkReply* r )

View File

@@ -86,6 +86,9 @@ namespace lastfm
/** use Tag::list to get the tag list out of the finished reply */
QNetworkReply* getTags() const;
QNetworkReply* getTopTags() const;
QNetworkReply* getTopTracks() const;
static QStringList getTopTracks( QNetworkReply* );
/** Last.fm dictates that you may submit at most 10 of these */
QNetworkReply* addTags( const QStringList& ) const;