Files
soulseek-rs-modded/soulseek-rs/src/config.rs
T
michel 1328736550 feat: configure download & upload (shared) directories
Add a --shared-dir / SOULSEEK_SHARED_DIR option and a SOULSEEK_DOWNLOAD_DIR
env for the download directory. The shared directory is resolved and
validated up front (tilde-expanded, must exist and be a directory); a
misconfigured value is a warning, not a fatal error.

The library gains an optional shared_directory on ClientSettings/Client
with a getter, keeping soulseek-rs-lib dependency-free. Resolution lives
in a new soulseek-rs/src/directories.rs with unit tests.
2026-07-19 13:12:44 +02:00

15 lines
373 B
Rust

pub struct SearchConfig {
pub username: String,
pub password: String,
pub server_host: String,
pub server_port: u16,
pub enable_listener: bool,
pub listener_port: u16,
pub query: String,
pub timeout: u64,
pub download_dir: String,
pub verbose: u8,
pub max_concurrent_downloads: usize,
pub shared_directory: Option<String>,
}