fix(api): call /albums/releaseWatch as REST, not signed RPC
Third try's the charm. The previous attempt called the endpoint via signed_get_auth (RPC-style with request_sig + request_ts), which yielded 'no Service found with those values' — the RPC dispatcher simply doesn't know this path. The /albums/* plural namespace (releaseWatch, favoriteAlbums, purchasedAlbums, similarTo, essential, artistAlbums, discoverAlbums) is REST-style, not RPC. QBZ already uses the same pattern for the /radio/* endpoints in src-tauri/src/api/client.rs: plain .get(url).headers(authenticated_headers()).query(...) with X-App-Id and X-User-Auth-Token, and no signing. Same pattern here. Also reverted the release_watch container addition to DiscoverContainers — /discover/index does not return it alongside the editorial sections, confirmed by the empty result when reading from there even with follows set. Radio and Artist Spotlight work in QBZ via this same REST + auth headers pattern despite being 'mobile' features; Release Watch should too. cc
This commit is contained in:
10 files changed
+174
-47
No files matched your search
@@ -760,6 +760,23 @@ impl<A: FrontendAdapter + Send + Sync + 'static> QbzCore<A> {
|
||||
.map_err(CoreError::Api)
|
||||
}
|
||||
|
||||
/// Get Release Watch — new releases from followed artists, labels and
|
||||
/// awards (Qobuz mobile "Radar de Novedades"). REST endpoint called with
|
||||
/// authenticated headers; no RPC signing.
|
||||
pub async fn get_release_watch(
|
||||
&self,
|
||||
limit: u32,
|
||||
offset: u32,
|
||||
) -> Result<SearchResultsPage<Album>, CoreError> {
|
||||
let client = self.client.read().await;
|
||||
let client = client.as_ref().ok_or(CoreError::NotInitialized)?;
|
||||
|
||||
client
|
||||
.get_release_watch(limit, offset)
|
||||
.await
|
||||
.map_err(CoreError::Api)
|
||||
}
|
||||
|
||||
/// Get artist page (full artist details with albums, tracks, similar)
|
||||
pub async fn get_artist_page(
|
||||
&self,
|
||||
|
||||
Reference in new issue
Block a user