mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 23:35:44 +00:00
feat(cli): completions, library/audio commands, server switcher
Embed bash and zsh completion scripts and add a `completions` subcommand. Extend the player CLI (library, audio device, instant mix) and surface `music_library` in snapshots. Add a shared active-server switcher in the header and locales; instant mix can reseed the queue from CLI and UI.
This commit is contained in:
@@ -13,5 +13,24 @@ fn main() {
|
||||
std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1");
|
||||
}
|
||||
}
|
||||
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
if psysonic_lib::cli::wants_version(&args) {
|
||||
psysonic_lib::cli::print_version();
|
||||
return;
|
||||
}
|
||||
if psysonic_lib::cli::wants_help(&args) {
|
||||
psysonic_lib::cli::print_help(
|
||||
args.first().map(|s| s.as_str()).unwrap_or("psysonic"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
if let Some(code) = psysonic_lib::cli::try_completions_dispatch(&args) {
|
||||
std::process::exit(code);
|
||||
}
|
||||
if psysonic_lib::cli::wants_info(&args) {
|
||||
psysonic_lib::cli::run_info_and_exit(&args);
|
||||
}
|
||||
|
||||
psysonic_lib::run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user