mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-18 20:40:43 +01:00
Only parse the tracks from the first release we find on musicbrainz for a CD.
This commit is contained in:
parent
6d9bc9d3f4
commit
6ddf9fa41b
@ -91,7 +91,7 @@ void MusicBrainzClient::DiscIdRequestFinished() {
|
||||
ResultList ret;
|
||||
QString artist;
|
||||
QString album;
|
||||
|
||||
|
||||
if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() != 200) {
|
||||
emit Finished(artist, album, ret);
|
||||
return;
|
||||
@ -117,11 +117,14 @@ void MusicBrainzClient::DiscIdRequestFinished() {
|
||||
}
|
||||
|
||||
while (!reader.atEnd()) {
|
||||
if (reader.readNext() == QXmlStreamReader::StartElement && reader.name() == "track") {
|
||||
QXmlStreamReader::TokenType token = reader.readNext();
|
||||
if (token == QXmlStreamReader::StartElement && reader.name() == "track") {
|
||||
Result track = ParseTrack(&reader);
|
||||
if (!track.title_.isEmpty()) {
|
||||
ret << track;
|
||||
}
|
||||
} else if (token == QXmlStreamReader::EndElement && reader.name() == "track-list") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user