Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Start MPRIS server only on Linux

+12 -9
+12 -9
crates/server/src/lib.rs
··· 9 9 }; 10 10 use rockbox_library::repo; 11 11 use rockbox_mpd::MpdServer; 12 - use rockbox_mpris::MprisServer; 13 12 use rockbox_sys::events::RockboxCommand; 14 13 use rockbox_sys::{self as rb, types::mp3_entry::Mp3Entry}; 15 14 use sqlx::{Pool, Sqlite}; ··· 223 222 // Wait for the rpc server to start 224 223 thread::sleep(std::time::Duration::from_millis(500)); 225 224 226 - thread::spawn( 227 - move || match async_std::task::block_on(MprisServer::start()) { 228 - Ok(_) => {} 229 - Err(e) => { 230 - eprintln!("Error starting mpris server: {}", e); 231 - } 232 - }, 233 - ); 225 + #[cfg(target_os = "linux")] 226 + { 227 + use rockbox_mpris::MprisServer; 228 + thread::spawn( 229 + move || match async_std::task::block_on(MprisServer::start()) { 230 + Ok(_) => {} 231 + Err(e) => { 232 + eprintln!("Error starting mpris server: {}", e); 233 + } 234 + }, 235 + ); 236 + } 234 237 235 238 thread::spawn(move || { 236 239 let runtime = tokio::runtime::Builder::new_current_thread()