mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
97f06459f3
Reframed M6 from "extract psysonic-commands" to "place each domain's
Tauri commands in its own domain crate" — the original psysonic-commands
proposal would have been a thin shell with no clear domain ownership
because each prior milestone already kept its own commands inline:
audio_*_commands in psysonic-audio
cache/sync commands in psysonic-syncfs
navidrome/discord/etc in psysonic-integration
The leftover analysis admin commands (7 of them) logically belong to
the analysis domain. So they move there:
src/lib_commands/app_api/analysis.rs →
crates/psysonic-analysis/src/commands.rs
WaveformCachePayload + LoudnessCachePayload moved out of top-crate
lib.rs into commands.rs
PlaybackQueryHandle gets a second closure (`should_defer_backfill`) so
analysis_enqueue_seed_from_url can ask "is a ranged playback already
going to seed this track?" without depending on psysonic-audio.
Top crate keeps the shell-flavored commands (window/tray/mini-player,
greet/exit_app, mpris/global-shortcuts/check_dir_accessible, perf,
cli_bridge) for M7 to clean up.
Behaviour preserving. Cargo check + clippy --workspace clean.
26 lines
950 B
Rust
26 lines
950 B
Rust
mod cli_bridge;
|
|
mod core;
|
|
mod integration;
|
|
mod perf;
|
|
mod platform;
|
|
|
|
// Tauri commands re-exported for the lib.rs invoke_handler.
|
|
pub(crate) use cli_bridge::{
|
|
cli_publish_library_list, cli_publish_player_snapshot, cli_publish_search_results,
|
|
cli_publish_server_list,
|
|
};
|
|
pub(crate) use core::{
|
|
exit_app, export_runtime_logs, frontend_debug_log, greet, set_logging_mode,
|
|
set_subsonic_wire_user_agent,
|
|
};
|
|
pub(crate) use perf::performance_cpu_snapshot;
|
|
pub(crate) use platform::{set_linux_webkit_smooth_scrolling, set_window_decorations};
|
|
pub(crate) use integration::{
|
|
check_dir_accessible, mpris_set_metadata, mpris_set_playback, register_global_shortcut,
|
|
unregister_global_shortcut,
|
|
};
|
|
|
|
// Discord, Navidrome admin, last.fm + radio-browser + CORS proxy, bandsintown,
|
|
// and analysis admin commands now live in their domain crates. invoke_handler!
|
|
// in lib.rs registers them with full paths so Tauri's `__cmd__*` macros resolve.
|