fix: play stations through the rotor session API so feedback is accepted

The old /rotor/station/{id}/feedback endpoint answered every event,
radioStarted included, with "condition is not met". Stations now run
on /rotor/session: a session starts with seeds (My Wave settings travel
as settingMoodEnergy/Diversity/Language seeds), batches continue it with
recent track ids, and feedback posts JSON events with millisecond ISO
timestamps and trackId:albumId to /rotor/session/{id}/feedback.

- ym-api posts JSON itself (yamuse keeps its JSON POST private), with the
  same client header; YmClient's Debug no longer prints anything
- Player keeps the session id, sends radioStarted with the first batch,
  and starts a new session when settings change
This commit is contained in:
Yuriy Panov committed 2026-10-15 15:30:59 +06:00
1 parent 03aa180840
commit 99f795b500
7 files changed
+257 -94

No files matched your search

+8
View File
@@ -70,6 +70,14 @@ impl Track {
Self::from_yamuse(raw).ok_or_else(|| crate::Error::Api("track has no id".into()))
}
/// `trackId:albumId`, the form station feedback and queues use.
pub fn full_id(&self) -> String {
match &self.album {
Some(album) if !self.id.contains(':') => format!("{}:{}", self.id, album.id),
_ => self.id.clone(),
}
}
/// "Artist A, Artist B", or "Unknown artist".
pub fn artist_line(&self) -> String {
crate::library::join_names(&self.artists)