record-daemon: fix gamephase event handling

This commit is contained in:
2026-03-19 22:05:13 +01:00
parent 7e346a33e0
commit dbb224e118
4 changed files with 37 additions and 0 deletions
+7
View File
@@ -210,6 +210,13 @@ impl Daemon {
// Handle recording start/stop
match transition {
StateTransition::GameStarted { game_id, champion } => {
// If already recording, stop the current recording first
if self.state_machine.is_recording() {
info!("Stopping previous recording before starting new one");
if let Err(e) = self.stop_recording().await {
warn!("Failed to stop previous recording: {}", e);
}
}
self.start_recording(game_id, champion.as_deref()).await?;
}
StateTransition::GameEnded => {