Mercurial > beefweb_mpris
comparison src/main.rs @ 0:d60ab8a4442f
*: check in
| author | Paper <paper@tflc.us> |
|---|---|
| date | Sat, 04 Apr 2026 12:32:50 -0400 |
| parents | |
| children | a5ee18c79a04 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:d60ab8a4442f |
|---|---|
| 1 mod player; | |
| 2 mod beefweb; | |
| 3 | |
| 4 use std::future; | |
| 5 | |
| 6 #[tokio::main(flavor = "local")] | |
| 7 async fn main() -> Result<(), anyhow::Error> | |
| 8 { | |
| 9 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?; | |
| 10 | |
| 11 tokio::task::spawn_local(server.run()); | |
| 12 | |
| 13 future::pending::<()>().await; | |
| 14 | |
| 15 return Ok(()); | |
| 16 } |
