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(());
}
