Skip to main content

start_api_background

Function start_api_background 

Source
pub fn start_api_background(
    state: Arc<SharedPlayerState>,
    cmd_tx: Sender<PlayerCommand>,
    db_path: PathBuf,
    port: Option<u16>,
    bind: Option<IpAddr>,
    subsonic_port: Option<u16>,
    playground: bool,
    session: Option<&'static str>,
)
Expand description

Start the API server beside the TUI, blocking until it stops. Called from a background thread when TUI mode has API enabled. session is whose saved session savePlaybackState writes: the caller’s, or none.