From 60a8f23a1465282cc1d71ff7a5427f30cb577689 Mon Sep 17 00:00:00 2001 From: acgnhik Date: Sat, 31 Dec 2022 20:50:50 +0800 Subject: [PATCH] refactor: update room info before handling status changes --- src/blrec/bili/live_monitor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/blrec/bili/live_monitor.py b/src/blrec/bili/live_monitor.py index 5ab774b..e5b7666 100644 --- a/src/blrec/bili/live_monitor.py +++ b/src/blrec/bili/live_monitor.py @@ -122,8 +122,10 @@ class LiveMonitor(EventEmitter[LiveEventListener], DanmakuListener, SwitchableMi danmu_cmd = danmu['cmd'] if danmu_cmd == DanmakuCommand.LIVE.value: + await self._live.update_room_info() await self._handle_status_change(LiveStatus.LIVE) elif danmu_cmd == DanmakuCommand.PREPARING.value: + await self._live.update_room_info() if danmu.get('round', None) == 1: await self._handle_status_change(LiveStatus.ROUND) else: