fix(release-watch): drop upcoming and non-streamable albums

`/favorite/getNewReleases` includes albums whose stream availability is
still in the future, so they appear in the Release Watch grid even
though `get_album` 404s as soon as the user clicks them. Same shape for
regional restrictions and label takedowns surfaced via `streamable=false`.

Add `release_date_stream` and `streamable` to the Album struct (both
optional with serde defaults so existing call sites stay happy) and
filter the response inside `v2_get_release_watch` after the artist
blacklist pass: skip any album marked `streamable=false` or whose
`release_date_stream` is strictly greater than today (UTC). The total
count gets adjusted alongside so pagination math stays consistent.

cc
This commit is contained in:
vicrodh committed 2026-05-15 00:35:38 -06:00
1 parent db39072488
commit 3903086f36
2 files changed
+45 -4

No files matched your search

+8
View File
@@ -251,6 +251,14 @@ pub struct Album {
#[serde(default)]
pub image: ImageSet,
pub release_date_original: Option<String>,
/// Date the album becomes available for streaming (ISO YYYY-MM-DD).
/// When in the future, the album is upcoming and cannot be fetched
/// via `get_album` yet — Release Watch uses this to gate clicks.
pub release_date_stream: Option<String>,
/// Whether the album is currently streamable. False for upcoming
/// releases, regional restrictions, or label takedowns.
#[serde(default)]
pub streamable: Option<bool>,
pub label: Option<Label>,
pub genre: Option<Genre>,
pub tracks_count: Option<u32>,