fix(logout): stop playback before deactivating session

Logout left audio playing through the ALSA/PipeWire backend while
tearing down the session. Now explicitly stops playback and clears
MPRIS state as the first step of logout.

cc
This commit is contained in:
vicrodh committed 2026-04-06 16:59:27 -06:00
1 parent 241dcf0814
commit e14e0a14a1
1 file changed
+9
+9
View File
@@ -2425,6 +2425,15 @@ pub async fn v2_logout(
) -> Result<(), RuntimeError> {
log::info!("[v2_logout] Starting logout");
// Step 0: Stop any active playback
{
let bridge_guard = bridge.get().await;
if let Err(e) = bridge_guard.stop() {
log::debug!("[v2_logout] Stop playback: {}", e);
}
app_state.media_controls.set_stopped();
}
// Step 1: Deactivate session (teardown stores, clear runtime state)
crate::session_lifecycle::deactivate_session(&app)
.await