mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +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.
15 lines
628 B
Rust
15 lines
628 B
Rust
//! `psysonic-analysis` — loudness/waveform analysis cache and the runtime
|
|
//! that drives HTTP backfill + CPU-seed work queues.
|
|
//!
|
|
//! Submodules mirror the original layout in the top crate:
|
|
//! - `analysis_cache` — SQLite-backed loudness/waveform store + compute helpers
|
|
//! - `analysis_runtime` — backfill queue, CPU-seed queue, queue snapshot loop
|
|
|
|
pub mod analysis_cache;
|
|
pub mod analysis_runtime;
|
|
pub mod commands;
|
|
|
|
// Re-export logging facade so submodules can write `crate::app_eprintln!()`
|
|
// the same way they did when they lived in the top crate.
|
|
pub use psysonic_core::{app_deprintln, app_eprintln, logging};
|