record-daemon: fix gamephase event handling
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user