0.2.0: play through Spotify Soloist
All checks were successful
release / release (push) Successful in 10m37s
All checks were successful
release / release (push) Successful in 10m37s
Spotify refuses librespot the audio keys ("error audio key 0 1",
librespot #1649), so nothing played. Playback now goes through Spotify
Soloist, Spotify's own headless Linux player:
- The TV downloads it from Spotify (redistribution is not allowed), keeps
it fresh (builds expire after 90 days), runs and restarts it, and drives
it over its local WebSocket API; its events feed Most szól.
- It needs the user's own Soloist API key: the key screen shows a QR code
to a small page on the TV where the phone pastes it (or type it on the
TV); asked once after sign-in, also in Settings. Then the TV is picked
once in the phone's Spotify app (pairing); home shows that step.
- Soloist is the Connect device; librespot only signs in (pairing code)
and browses. Its player, Connect and zeroconf are gone, and with them
GStreamer.
- A track from a list plays and the next ones are queued (Soloist's play
takes one URI). The queue panel is back (Soloist reports the queue).
- Settings: the player's state and key instead of quality/normalisation/
autoplay (Soloist decides those).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,16 @@ impl Screen for Home {
|
||||
lines.push(L::text("loading", "Betöltés…", "caption"));
|
||||
return Spec { lines, frame };
|
||||
}
|
||||
// One step left before anything can play.
|
||||
let solo = cx.solo();
|
||||
if !matches!(solo, crate::soloist::Status::Ready | crate::soloist::Status::Starting) {
|
||||
let (title, text) = crate::screens::settings::solo_text(&solo, &cx.cfg().device_name);
|
||||
let mut n = L::item("solo", format!("Lejátszó: {title}"), text, "", Vec::new());
|
||||
if matches!(solo, crate::soloist::Status::NeedKey | crate::soloist::Status::Failed(_)) {
|
||||
n.chips = vec![crate::page::Ch::new("key", "Kulcs megadása").tone("primary")];
|
||||
}
|
||||
lines.push(n);
|
||||
}
|
||||
let d = &self.data;
|
||||
if let Some(r) = d.recent.as_ref().filter(|r| !r.is_empty()) {
|
||||
lines.push(L::cards("recent", "Legutóbb játszott", "square", r.iter().map(|e| entity_card(e, d.liked_total)).collect()).captions());
|
||||
@@ -132,7 +142,11 @@ impl Screen for Home {
|
||||
Spec { lines, frame }
|
||||
}
|
||||
|
||||
fn activate(&mut self, cx: &Cx, _line: &str, item: &str) {
|
||||
fn activate(&mut self, cx: &Cx, line: &str, item: &str) {
|
||||
if line == "solo" {
|
||||
cx.c.open_key_screen();
|
||||
return;
|
||||
}
|
||||
screens::open_card(cx, item);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user