fix: correct top_tracks field name and remove unused extra param
Qobuz API uses snake_case so the field is top_tracks, not topTracks. Also remove the extra=topTracks query param — top tracks are included in the default artist/page response without it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -190,8 +190,8 @@ void ArtistView::setArtist(const QJsonObject &artist)
|
||||
m_bioLabel->setVisible(false);
|
||||
}
|
||||
|
||||
// Top tracks: artist/page?extra=topTracks returns {"topTracks": {"items": [...]}}
|
||||
const QJsonArray topTracks = artist["topTracks"].toObject()["items"].toArray();
|
||||
// Top tracks are in the default artist/page response under "top_tracks"
|
||||
const QJsonArray topTracks = artist["top_tracks"].toObject()["items"].toArray();
|
||||
m_topTracks->loadTracks(topTracks);
|
||||
m_topTracksSection->setVisible(!topTracks.isEmpty());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user