feat(discover): add Release Watch section to Home and For You
The Qobuz mobile client (v9.7) surfaces a 'Release Watch' /
'Radar de Novedades' feed in its Discover screens — new releases
from the artists, labels and award series the user follows. We
didn't have parity for it. This adds it as a module in both
Discover tabs.
Backend:
- qbz-qobuz: new ALBUMS_RELEASE_WATCH endpoint constant
(/albums/releaseWatch, plural as in mobile) and signed_get_auth
client method returning a SearchResultsPage<Album>. Signing
method is 'albumsreleaseWatch' per the Qobuz secret protocol.
- qbz-core: passthrough get_release_watch on QbzCore.
- src-tauri: core_bridge wrapper, new v2_get_release_watch Tauri
command registered in lib.rs. Filters through the artist
blacklist like other album endpoints.
Frontend:
- HomeView: new renderable section 'releaseWatch' in the home tab
(default visible, placed right after New Releases). Parallel
fetch alongside the existing discover_index call; mapped via
the existing toAlbumCard helper.
- ForYouTab: section appears ahead of 'Essentials' since followed
artists/labels are typically more personal.
- homeSettingsStore: new HomeSectionId 'releaseWatch' in the type
union and DEFAULT_SECTIONS so the user can toggle/reorder it
from home customization.
- i18n: discover.releaseWatch.title + subtitle added to all five
locales, using Qobuz's own translations where they exist
('Radar de Novedades' for Spanish, 'Release-Radar' for German)
with the 'followed artists/labels/awards' subtitle copy adapted
from the mobile app's strings.xml resources.
cc
This commit is contained in:
14 files changed
+307
-10
No files matched your search
@@ -767,6 +767,47 @@ impl QobuzClient {
|
||||
Ok(serde_json::from_value(albums.clone())?)
|
||||
}
|
||||
|
||||
/// Get Release Watch — new and upcoming releases from artists, labels
|
||||
/// and awards the user follows. Exposed on mobile/web as "Release Watch"
|
||||
/// or "Radar de Novedades".
|
||||
///
|
||||
/// Returns the same `{items, offset, limit, total}` page structure as
|
||||
/// `get_featured_albums`. Requires the user to be authenticated; the
|
||||
/// endpoint uses the follows on the caller's account.
|
||||
pub async fn get_release_watch(
|
||||
&self,
|
||||
limit: u32,
|
||||
offset: u32,
|
||||
) -> Result<SearchResultsPage<Album>> {
|
||||
let url = endpoints::build_url(paths::ALBUMS_RELEASE_WATCH);
|
||||
let params: Vec<(&str, String)> = vec![
|
||||
("limit", limit.to_string()),
|
||||
("offset", offset.to_string()),
|
||||
];
|
||||
|
||||
let http_response = self
|
||||
.signed_get_auth(&url, "albumsreleaseWatch", ¶ms)
|
||||
.await?;
|
||||
log::debug!(
|
||||
"[API] get_release_watch(limit={}, offset={}) status={}",
|
||||
limit,
|
||||
offset,
|
||||
http_response.status()
|
||||
);
|
||||
let response: Value = http_response.json().await?;
|
||||
|
||||
// The mobile client calls into /albums/releaseWatch and expects an
|
||||
// `albums` key wrapping the page. If the server changes this someday
|
||||
// (e.g. to `releaseWatch`), fall back transparently.
|
||||
let page = response
|
||||
.get("albums")
|
||||
.or_else(|| response.get("releaseWatch"))
|
||||
.cloned()
|
||||
.unwrap_or(response);
|
||||
|
||||
Ok(serde_json::from_value(page)?)
|
||||
}
|
||||
|
||||
/// Get list of genres
|
||||
pub async fn get_genres(&self, parent_id: Option<u64>) -> Result<Vec<GenreInfo>> {
|
||||
let url = endpoints::build_url(paths::GENRE_LIST);
|
||||
|
||||
@@ -20,6 +20,10 @@ pub mod paths {
|
||||
pub const ALBUM_GET: &str = "/album/get";
|
||||
pub const ALBUM_SEARCH: &str = "/album/search";
|
||||
pub const ALBUM_GET_FEATURED: &str = "/album/getFeatured";
|
||||
// Release Watch: releases from artists, labels, and awards the user
|
||||
// follows. Mobile/web apps expose this in Discover as "Release Watch" /
|
||||
// "Radar de Novedades". Endpoint path uses the `/albums` (plural) prefix.
|
||||
pub const ALBUMS_RELEASE_WATCH: &str = "/albums/releaseWatch";
|
||||
|
||||
// Artist
|
||||
pub const ARTIST_GET: &str = "/artist/get";
|
||||
|
||||
Reference in new issue
Block a user