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.

library: create Music directory if it doesn't exist

+9 -1
+9 -1
crates/cli/src/lib.rs
··· 2 2 use owo_colors::OwoColorize; 3 3 use rockbox_library::audio_scan::scan_audio_files; 4 4 use rockbox_library::create_connection_pool; 5 - use std::thread; 6 5 use std::{env, ffi::CStr}; 6 + use std::{fs, thread}; 7 7 8 8 #[macro_export] 9 9 macro_rules! cast_ptr { ··· 52 52 53 53 thread::spawn(move || { 54 54 let home = env::var("HOME").unwrap(); 55 + 56 + match fs::create_dir_all(format!("{}/Music", home)) { 57 + Ok(_) => {} 58 + Err(e) => { 59 + eprintln!("Failed to create Music directory: {}", e); 60 + } 61 + } 62 + 55 63 let path = env::var("ROCKBOX_LIBRARY").unwrap_or(format!("{}/Music", home)); 56 64 let rt = tokio::runtime::Runtime::new().unwrap(); 57 65 rt.block_on(async {