From 76406aa74605a44f798bf5e7fac6fa17afd9e67d Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 15 Jun 2026 13:58:39 -0600 Subject: [PATCH] fix(slint/discover): seed DailyQ/WeeklyQ with Qobuz-only track ids MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DailyQ/WeeklyQ build their /dynamic/suggest seed from recently-played track ids. Recently-played now includes local and Plex tracks whose ids are not Qobuz catalog ids — numeric Plex rating keys even passed the u64 parse, so they reached Qobuz and the mix request failed. Filter the seed to Qobuz (and legacy pre-source) tracks before parsing, and skip the request when no Qobuz seeds remain. Local tracks stay visible in the Recent rows. cc --- crates/qbz-slint/src/mix.rs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/crates/qbz-slint/src/mix.rs b/crates/qbz-slint/src/mix.rs index b8dadaccc..fdd198281 100644 --- a/crates/qbz-slint/src/mix.rs +++ b/crates/qbz-slint/src/mix.rs @@ -42,16 +42,26 @@ where { match kind { "daily" | "weekly" => { + // Seed /dynamic/suggest with QOBUZ track ids ONLY. Recently-played + // now includes local/Plex tracks whose ids are NOT in the Qobuz + // catalog (e.g. numeric Plex rating keys that pass the u64 parse); + // sending those made the mix request fail. Empty `source` = legacy + // pre-source entries (treated as Qobuz). Local/Plex are excluded. let seeds: Vec = crate::recently::load() .into_iter() + .filter(|t| t.source.is_empty() || t.source == "qobuz") .filter_map(|t| t.id.parse::().ok()) .take(50) .collect(); - runtime - .core() - .get_dynamic_suggest(&seeds, 50) - .await - .unwrap_or_default() + if seeds.is_empty() { + Vec::new() + } else { + runtime + .core() + .get_dynamic_suggest(&seeds, 50) + .await + .unwrap_or_default() + } } "fav" => { let mut tracks = favorite_tracks(runtime).await;