fix(api): Release Watch lives at /favorite/getNewReleases?type=artists

The inferred OpenAPI spec
(qbz-nix-docs/qobuz-api-inferred-openapi-v9.7.0.3.yaml, source:
x20/b.java) documents the endpoint as /favorite/getNewReleases with
three required query params:

  @GET favorite/getNewReleases
  - type: String   (artists | labels | awards — matches the three
                    tabs in the mobile UI)
  - limit: Integer
  - offset: Integer

My earlier attempts at /albums/releaseWatch were chasing the Android
route-table entry for the Release Watch *screen*, not the HTTP call
that screen makes. Different layer.

Also removes my made-up speculation about mobile app_id gating — the
/favorite/* endpoints are standard web-API calls the existing client
already knows how to sign (via authenticated_headers + /0.2/ base URL).

v2_get_release_watch now takes an optional releaseType arg defaulting
to 'artists' so callers can switch tabs later without another command.

cc
This commit is contained in:
vicrodh committed 2026-04-14 07:47:42 -06:00
1 parent 541c3613c9
commit ce375008ab
5 files changed
+39 -31

No files matched your search

+4 -4
View File
@@ -760,11 +760,11 @@ 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.
/// Get Release Watch — new releases from followed artists/labels/awards.
/// `release_type` must be one of "artists" | "labels" | "awards".
pub async fn get_release_watch(
&self,
release_type: &str,
limit: u32,
offset: u32,
) -> Result<SearchResultsPage<Album>, CoreError> {
@@ -772,7 +772,7 @@ impl<A: FrontendAdapter + Send + Sync + 'static> QbzCore<A> {
let client = client.as_ref().ok_or(CoreError::NotInitialized)?;
client
.get_release_watch(limit, offset)
.get_release_watch(release_type, limit, offset)
.await
.map_err(CoreError::Api)
}