From 3e49fa59bb3def177b5484e3dde8197f53e22f4d Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 1 Feb 2021 10:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=97=A0=E6=B3=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=8A=B6=E6=80=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api.py b/api.py index ab0c7bb..94f1b12 100644 --- a/api.py +++ b/api.py @@ -282,6 +282,7 @@ class XiGuaLiveApi: return False self.broadcaster = None self.isValidUser = False + self.isLive = False if "data" in d and d["data"] is not None: for i in d["data"]: if self.broadcaster is not None: @@ -310,6 +311,7 @@ class XiGuaLiveApi: if self.broadcaster is None: self.isValidUser = False return False + self.isLive = False _formatData = {"TIMESTAMP": time.time() * 1000, "userId": self.broadcaster.ID} _COMMON = COMMON_GET_PARAM.format_map(_formatData) _formatData['COMMON'] = _COMMON @@ -346,6 +348,7 @@ class XiGuaLiveApi: return False if (self._updRoomAt + timedelta(minutes=3) > datetime.now()) and not force: return self.isLive + self.isLive = False _formatData = {"TIMESTAMP": time.time() * 1000, "roomId": self.roomID} _COMMON = COMMON_GET_PARAM.format_map(_formatData) _formatData['COMMON'] = _COMMON