diff options
| author | Arno <arno@disconnect.de> | 2017-07-06 19:12:47 +0200 |
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2017-07-06 19:12:47 +0200 |
| commit | ddd9067ee08e9b37d6a5ecca8ce0c5a53b9b539a (patch) | |
| tree | 6f556fef6afee98868f1bfc6a4e69ef9f9b0006a /playerwidget.cpp | |
| parent | dbc19ad71cbac5166aa0b82c97b726b464f4fdca (diff) | |
| download | BeetPlayer-ddd9067ee08e9b37d6a5ecca8ce0c5a53b9b539a.tar.gz BeetPlayer-ddd9067ee08e9b37d6a5ecca8ce0c5a53b9b539a.tar.bz2 BeetPlayer-ddd9067ee08e9b37d6a5ecca8ce0c5a53b9b539a.zip | |
Improved MusicBrainz lookup
Only show official albums and compilations, no bootlegs.
Wow, lambdas are so cool. Now std::predicates are finally useful!
Diffstat (limited to 'playerwidget.cpp')
| -rw-r--r-- | playerwidget.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp index 6eb5821..a595319 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -1258,9 +1258,13 @@ void PlayerWidget::webDlDone(){ text.append(QString("<li><a href=\"https://musicbrainz.org/release-group/%1\">%1</a></li>").arg(rg)); } text.append("</ul>"); - text.append(tr("<b>Other Albums</b><ul>")); - for(QMap<QString, QString>::const_iterator it = mWebDownloader->otherData().constBegin(); it != mWebDownloader->otherData().constEnd(); ++it){ - text.append(QString("<li><a href=\"https://musicbrainz.org/release-group/%1\">%2</a></li>").arg(it.value()).arg(it.key())); + const QMap<QString, QString> other = mWebDownloader->otherData(); + text.append(QString(tr("<b>Other Albums (%1):</b><ul>")).arg(QString::number(other.count()))); + QStringList albums = other.values(); + std::sort(albums.begin(), albums.end()); + foreach(QString a, albums){ + QString id = other.key(a); + text.append(QString("<li><a href=\"https://musicbrainz.org/release-group/%1\">%2</a></li>").arg(id).arg(a)); } text.append("</ul>"); mLeftTE->setText(text); |
