Mercurial > beefweb_mpris
diff src/main.rs @ 0:d60ab8a4442f
*: check in
| author | Paper <paper@tflc.us> |
|---|---|
| date | Sat, 04 Apr 2026 12:32:50 -0400 |
| parents | |
| children | a5ee18c79a04 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main.rs Sat Apr 04 12:32:50 2026 -0400 @@ -0,0 +1,16 @@ +mod player; +mod beefweb; + +use std::future; + +#[tokio::main(flavor = "local")] +async fn main() -> Result<(), anyhow::Error> +{ + let server = mpris_server::LocalServer::new("org.foobar2000.foobar2000", player::BeefwebPlayer::new("http://127.0.0.1:8880/api", format!("{}/beefweb_mpris", dirs::cache_dir().unwrap().to_str().unwrap()).as_str())).await?; + + tokio::task::spawn_local(server.run()); + + future::pending::<()>().await; + + return Ok(()); +}
