Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Daemon mode: persistent headless Connect device for CLI playback

Aperta
#466 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend, cli

Direzione di ricerca

Start by reading the issue's references to the driver extraction and lib/bin split, plus the existing saved-device path and StreamingPlayer entry points. The issue identifies single-instance locking, auth/cache sharing and handoff, shutdown, and platform autostart as open design requirements; there are no specific files or tests named. Done means a persistent headless Connect device can serve CLI playback without conflicting with the TUI or leaving a ghost device.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Is your feature request related to a problem? Please describe.

The CLI is a remote control for an existing Spotify device. After #465 it can activate a listed idle device, but when no Spotify client is open anywhere there is still nothing to make sound: spotatui playback --toggle on a machine with no running player has no target. The CLI process itself cannot host native streaming because it is one-shot; the audio pipeline and the Connect device would die the moment the command exits. Building a librespot session per shell invocation is also the short-lived connect/disconnect pattern that produced the ghost Connect devices of #297, and it would add a session handshake of a second or two to every command.

Today the answer is "keep the TUI running in a terminal somewhere", which works but should not be a requirement for shell-driven playback.

Describe the solution you'd like

A spotatui daemon subcommand: one persistent headless process that owns a StreamingPlayer as a long-lived Spotify Connect device (in the spirit of spotifyd), while the CLI stays a thin remote that reaches it through the existing saved-device path. Rough scope:

  • single-instance locking so a second daemon (or a TUI with native streaming) does not fight over the persisted Connect device_id
  • shared auth and cache with the TUI, with a defined handoff when the TUI starts while the daemon runs (or mutual exclusion)
  • clean shutdown (spotatui daemon --stop or signal handling) so no ghost device is left behind
  • an autostart story per platform (systemd unit, Windows service or startup task, launchd)

Describe alternatives you've considered

  • Embedding librespot in each one-shot CLI invocation: audio stops when the process exits, session churn risks ghost devices (#297), and every command pays the connect latency.
  • Requiring a running TUI instance: works today (#465 activates its device from the CLI) but ties background playback to an open terminal.
  • Doing nothing: acceptable for users who always have the official client or the TUI open, which is exactly the assumption #464 showed does not hold.

Additional context

A long-lived headless core process overlaps heavily with the frontend-neutral substrate work already underway (driver extraction, lib/bin split). The daemon and any future non-terminal frontend want the same thing: a core that owns playback and state without a terminal attached. Designing the daemon as a consumer of that substrate, rather than a CLI bolt-on, keeps one core instead of two.

Lingua principale
Rust
Stelle
1.4k
Fork
238
Merge medio
9h 21m
PR unite (30g)
193

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LargeModGames/spotatui

Tutte le issue di LargeModGames/spotatui

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.