mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
MusicBrainzPlugin: limit InfoArtistReleases to most popular artist only
This commit is contained in:
@@ -168,12 +168,15 @@ MusicBrainzPlugin::gotReleaseGroupsSlot()
|
||||
{
|
||||
case InfoArtistReleases:
|
||||
{
|
||||
QString popularId = releaseGroupsNL.at(0).firstChildElement( "artist-credit" ).firstChildElement( "name-credit" ).firstChildElement( "artist" ).attribute( "id" );
|
||||
|
||||
QStringList albums;
|
||||
for ( int i = 0; i < releaseGroupsNL.count(); i++ )
|
||||
{
|
||||
QString groupTitle = releaseGroupsNL.at(i).firstChildElement("title").text();
|
||||
QString a = releaseGroupsNL.at(i).firstChildElement( "artist-credit" ).firstChildElement( "name-credit" ).firstChildElement( "artist" ).firstChildElement( "name" ).text();
|
||||
if ( !albums.contains( groupTitle ) && hash["artist"] == a )
|
||||
QString id = releaseGroupsNL.at(i).firstChildElement( "artist-credit" ).firstChildElement( "name-credit" ).firstChildElement( "artist" ).attribute( "id" );
|
||||
if ( !albums.contains( groupTitle ) && hash["artist"] == a && id == popularId )
|
||||
{
|
||||
albums << groupTitle;
|
||||
tDebug() << Q_FUNC_INFO << groupTitle;
|
||||
|
Reference in New Issue
Block a user