Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadOrSetupConfig ¶
LoadOrSetupConfig loads the config file. If no config exists, it runs first-time setup by prompting the user via the provided reader and writer. Pass nil for r/w to use os.Stdin/os.Stdout.
Types ¶
type AuthSession ¶
AuthSession holds the result of auth bootstrap.
func Bootstrap ¶
func Bootstrap(rc RuntimeConfig) (*AuthSession, error)
Bootstrap authenticates with Spotify and returns a ready-to-use session. If no saved token exists, it runs the interactive login flow.
type LibrespotServices ¶
type LibrespotServices struct {
Options []ui.ModelOption
Cleanup func()
}
LibrespotServices holds the result of librespot/audio startup.
func StartLibrespot ¶
func StartLibrespot(rc RuntimeConfig, client *spotify.Client) *LibrespotServices
StartLibrespot starts the librespot process and audio pipe reader if enabled by the config. Returns UI model options and a cleanup function. If librespot is not enabled, returns nil.
type RuntimeConfig ¶
RuntimeConfig holds the resolved configuration with defaults applied. ResolvedRedirectURL and ResolvedDeviceName are the final values after applying defaults — use these instead of the raw Config fields.
func ResolveRuntime ¶
func ResolveRuntime(cfg *config.Config) RuntimeConfig
ResolveRuntime applies defaults to the raw config and returns a RuntimeConfig ready for use by the rest of the application.