Spotify for Fennec OS: native TV client
All checks were successful
release / release (push) Successful in 12m14s
All checks were successful
release / release (push) Successful in 12m14s
Rust + Slint on sf-ui's Liquid Glass, with the page engine of Netflex TV. librespot plays (GStreamer on the TV) and makes the TV a Spotify Connect device; the Web API (token from the session) feeds the pages. - Sign-in with the phone: a pairing code / QR code (spotify.com/pair, OAuth device flow) or picking the TV in the Spotify app (zeroconf). - Home, search, library, playlist / album / liked songs / podcast pages, artist pages, settings; the user's picture top right. - Now playing: seek, shuffle, repeat, like, synced lyrics, queue. - package.sh builds x86-64 and aarch64 (Raspberry Pi); the Gitea CI releases both on a tag. - tools/mock_server.py and SPOTIFY_MOCK for work without an account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
91
ui/types.slint
Normal file
91
ui/types.slint
Normal file
@@ -0,0 +1,91 @@
|
||||
// Data the Rust side fills in. Every page is a list of Lines (src/page.rs);
|
||||
// all lengths here are design px (1920x1080 grid), multiplied by Tv.u.
|
||||
|
||||
// A button / choice / text field on a line. x, y relative to the line.
|
||||
export struct Chip {
|
||||
id: string,
|
||||
text: string,
|
||||
icon: string,
|
||||
x: float,
|
||||
y: float,
|
||||
w: float,
|
||||
h: float,
|
||||
// Selected (a choice, the current tab).
|
||||
active: bool,
|
||||
// "" | "primary" (accent glass) | "danger" | "field" (text field)
|
||||
tone: string,
|
||||
enabled: bool,
|
||||
}
|
||||
|
||||
// A card in a cards line.
|
||||
export struct Card {
|
||||
id: string,
|
||||
title: string,
|
||||
// Under the card (cards lines with captions).
|
||||
caption: string,
|
||||
detail: string,
|
||||
image: image,
|
||||
// 0..1; negative = no bar.
|
||||
progress: float,
|
||||
badge: string,
|
||||
badge-tone: string,
|
||||
// "liked": the liked songs' card (a heart on a gradient).
|
||||
mark: string,
|
||||
big: string,
|
||||
// Highlighted (plays now).
|
||||
current: bool,
|
||||
}
|
||||
|
||||
export struct Check {
|
||||
state: int,
|
||||
label: string,
|
||||
detail: string,
|
||||
}
|
||||
|
||||
// One line of a page.
|
||||
// hero big title block with buttons; with a cover (`framed`) the
|
||||
// texts sit right of a square (or round) picture
|
||||
// heading section title (+ subtitle)
|
||||
// text paragraph (style "body" | "caption" | "label" | "warn" | "bad" | "good")
|
||||
// notice icon + title + text, toned ("good" | "bad" | "warn" | "info")
|
||||
// chips a row of chips (title = label above them)
|
||||
// cards a row of cards (style "square" | "round" | "landscape"; captions under them)
|
||||
// item list row: optional picture, title, meta, text, chips
|
||||
// track a song row: number or art, title, meta, duration, "more" chip
|
||||
// checks two columns of check rows
|
||||
// keyboard room for the page's on-screen keyboard
|
||||
export struct Line {
|
||||
id: string,
|
||||
kind: string,
|
||||
y: float,
|
||||
h: float,
|
||||
x: float,
|
||||
w: float,
|
||||
title: string,
|
||||
subtitle: string,
|
||||
meta: string,
|
||||
extra: string,
|
||||
text: string,
|
||||
note: string,
|
||||
style: string,
|
||||
tone: string,
|
||||
icon: string,
|
||||
image: image,
|
||||
logo: image,
|
||||
cover: image,
|
||||
round: bool,
|
||||
framed: bool,
|
||||
progress: float,
|
||||
col: int,
|
||||
captions: bool,
|
||||
cards: [Card],
|
||||
chips: [Chip],
|
||||
checks: [Check],
|
||||
}
|
||||
|
||||
// A row of the queue (now playing).
|
||||
export struct QueueItem {
|
||||
title: string,
|
||||
artist: string,
|
||||
image: image,
|
||||
}
|
||||
Reference in New Issue
Block a user