feat(player,queue): loudness strip controls and normalization readout fixes

- Add Tauri command to delete loudness_cache rows for a track and helpers in AnalysisCache.
- Queue tech strip: click dB to reseed loudness; LUFS target picker via body portal; metric styling aligned with strip (no link chrome).
- Player store: reseed clears local cache and replays analysis seed; show loudness dB from SQLite cache when live state is still null; allow first numeric normalization-state update through the short duplicate filter.
- audio_update_replay_gain: resolve loudness from the requested gain when playback URL is not pinned yet.
This commit is contained in:
Maxim Isaev
2026-04-25 23:38:27 +03:00
parent 453151f1fc
commit 53cab7654c
6 changed files with 273 additions and 10 deletions
+5 -1
View File
@@ -4053,9 +4053,13 @@ pub fn audio_update_replay_gain(
} else {
None
};
// If `current_playback_url` is not pinned yet, still honour JS `loudness_gain_db`
// so `loudness_ui_current_gain_db` can show a number (otherwise `and_then`
// drops the requested gain entirely).
let resolved_loudness_gain_db = url_for_loudness
.as_deref()
.and_then(|u| resolve_loudness_gain_from_cache(&app, u, target_lufs, loudness_gain_db));
.and_then(|u| resolve_loudness_gain_from_cache(&app, u, target_lufs, loudness_gain_db))
.or(loudness_gain_db);
let effective_loudness_db = if norm_mode == 2 {
match url_for_loudness.as_deref() {
Some(u) => loudness_gain_db_or_startup(&app, u, target_lufs, loudness_gain_db),