feat: most-popular search as default Top Results tab
Add /most-popular/get endpoint support (discovered via Burp): - Returns mixed artists/albums/tracks ordered by popularity for a query - New 'Top Results' tab shown first/default in the search panel - Badge column: A (artist, blue), H (hi-res album, gold), A (album, gray), T (track, green) - Full context menu support on all item types in the new tab - Both most-popular and regular search fire on submit in parallel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -384,6 +384,15 @@ impl QobuzClient {
|
||||
|
||||
// --- Search ---
|
||||
|
||||
pub async fn most_popular_search(&self, query: &str, limit: u32) -> Result<serde_json::Value> {
|
||||
let resp = self
|
||||
.get_request("most-popular/get")
|
||||
.query(&[("query", query), ("offset", "0"), ("limit", &limit.to_string())])
|
||||
.send()
|
||||
.await?;
|
||||
Self::check_response(resp).await
|
||||
}
|
||||
|
||||
pub async fn search(&self, query: &str, offset: u32, limit: u32) -> Result<SearchCatalogDto> {
|
||||
let (tracks, albums, artists) = tokio::try_join!(
|
||||
self.search_tracks(query, offset, limit),
|
||||
|
||||
Reference in New Issue
Block a user