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:
17
ui/app.slint
17
ui/app.slint
@@ -11,7 +11,7 @@ import { TvWindow, Tv, SfText, GlassRect, MenuItem } from "@sf-ui/sf-ui.slint";
|
||||
import { Line, Chip, Card, Check, QueueItem } from "types.slint";
|
||||
import { LinePage } from "page.slint";
|
||||
import { NowPlayingScreen } from "nowplaying.slint";
|
||||
import { ConnectScreen, InputScreen, MessageScreen } from "signin.slint";
|
||||
import { ConnectScreen, InputScreen, MessageScreen, KeyScreen } from "signin.slint";
|
||||
import { SelectOverlay, Toast } from "overlays.slint";
|
||||
|
||||
export { Tv, SfText, MenuItem, Line, Chip, Card, Check, QueueItem }
|
||||
@@ -20,7 +20,7 @@ export component App inherits TvWindow {
|
||||
title: "Spotify";
|
||||
forward-focus: keys;
|
||||
|
||||
// "message", "signin", "page", "nowplaying"
|
||||
// "message", "signin", "solokey", "page", "nowplaying"
|
||||
in property <string> screen: "message";
|
||||
// The key text (Slint's Key codes) and whether it repeats; true = handled.
|
||||
callback key(string, bool) -> bool;
|
||||
@@ -29,6 +29,8 @@ export component App inherits TvWindow {
|
||||
animate message-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); }
|
||||
out property <float> signin-t: self.screen == "signin" ? 1 : 0;
|
||||
animate signin-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); }
|
||||
out property <float> solokey-t: self.screen == "solokey" ? 1 : 0;
|
||||
animate solokey-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); }
|
||||
out property <float> page-t: self.screen == "page" ? 1 : 0;
|
||||
animate page-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); }
|
||||
out property <float> np-t: self.screen == "nowplaying" ? 1 : 0;
|
||||
@@ -79,6 +81,14 @@ export component App inherits TvWindow {
|
||||
visible: self.alpha > 0.001;
|
||||
}
|
||||
|
||||
// ---- Soloist key ----
|
||||
in property <image> solokey-qr <=> solokey.qr;
|
||||
in property <string> solokey-url <=> solokey.url;
|
||||
solokey := KeyScreen {
|
||||
alpha: root.vis(root.solokey-t) * root.under;
|
||||
visible: root.solokey-t > 0.001;
|
||||
}
|
||||
|
||||
// ---- page ----
|
||||
in property <[Line]> page-lines <=> page.lines;
|
||||
in property <int> page-focus <=> page.focus-line;
|
||||
@@ -139,6 +149,8 @@ export component App inherits TvWindow {
|
||||
in property <int> np-lyric-line <=> np.lyric-line;
|
||||
in property <bool> np-lyrics-synced <=> np.lyrics-synced;
|
||||
in property <string> np-lyrics-note <=> np.lyrics-note;
|
||||
in property <[QueueItem]> np-queue <=> np.queue;
|
||||
in property <string> np-queue-note <=> np.queue-note;
|
||||
in property <string> np-device <=> np.device;
|
||||
np := NowPlayingScreen {
|
||||
alpha: root.vis(root.np-t) * root.under;
|
||||
@@ -183,6 +195,7 @@ export component App inherits TvWindow {
|
||||
|
||||
// ---- glass, in drawing order (listed by src/main.rs) ----
|
||||
out property <[GlassRect]> glass-signin: signin.glass;
|
||||
out property <[GlassRect]> glass-solokey: solokey.glass;
|
||||
out property <[GlassRect]> glass-page: page.glass;
|
||||
out property <[GlassRect]> glass-page-keyboard: page.glass-keyboard;
|
||||
out property <[GlassRect]> glass-np: np.glass;
|
||||
|
||||
Reference in New Issue
Block a user