mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 23:35:44 +00:00
diag(#1090/#1072): trace device-changed event into the frontend hang
The Rust reopen path returns cleanly (watcher keeps polling), so the UI hang lives in the frontend after audio:device-changed. Log the emitted payload (resumed null vs f64) and trace the bridge: event received → store state → before/after playTrack. Last surviving line localises the hang. TEMPORARY — revert before the real fix.
This commit is contained in:
@@ -93,6 +93,15 @@ pub(crate) async fn reopen_output_stream(
|
||||
// Falls back gracefully to the frontend path if conditions aren't met.
|
||||
let resumed = try_resume_after_device_change(app, &snapshot).await;
|
||||
|
||||
// [DIAG #1090 — TEMPORARY] What does Rust hand to the frontend? resumed=true
|
||||
// → null payload (frontend does nothing). resumed=false → f64 → frontend
|
||||
// calls playTrack. This tells us which frontend branch the hang follows.
|
||||
crate::app_eprintln!(
|
||||
"[psysonic] DIAG-1090 reopen returning: resumed={resumed} was_playing={} payload={}",
|
||||
snapshot.is_playing,
|
||||
if resumed { "null".to_string() } else { format!("{:?}", snapshot.current_time_secs) }
|
||||
);
|
||||
|
||||
match notify {
|
||||
ReopenNotify::DeviceChanged => {
|
||||
// null → Rust already resumed; frontend skips playTrack
|
||||
|
||||
Reference in New Issue
Block a user