From e37de6d897b2c55d7fe9bcf8cbb7a3f732b3c67b Mon Sep 17 00:00:00 2001 From: joren Date: Wed, 25 Mar 2026 13:58:51 +0100 Subject: [PATCH] fix: correct top_tracks field name and remove unused extra param MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- rust/src/api/client.rs | 5 +---- src/view/artistview.cpp | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/rust/src/api/client.rs b/rust/src/api/client.rs index 59129ab..bc30b6a 100644 --- a/rust/src/api/client.rs +++ b/rust/src/api/client.rs @@ -258,10 +258,7 @@ impl QobuzClient { pub async fn get_artist_page(&self, artist_id: i64) -> Result { let resp = self .get_request("artist/page") - .query(&[ - ("artist_id", artist_id.to_string()), - ("extra", "topTracks".to_string()), - ]) + .query(&[("artist_id", artist_id.to_string())]) .send() .await?; Self::check_response(resp).await diff --git a/src/view/artistview.cpp b/src/view/artistview.cpp index 99c31b3..e83b3b9 100644 --- a/src/view/artistview.cpp +++ b/src/view/artistview.cpp @@ -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());