From b4559f677155a5486cce2349af97bbe4a4e762bb Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Fri, 17 May 2019 21:20:25 +0800 Subject: [PATCH] Fix Bug --- Common.py | 5 +++-- WinMain.py | 1 - api.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Common.py b/Common.py index 6f11bd6..20cfc94 100644 --- a/Common.py +++ b/Common.py @@ -257,9 +257,9 @@ def appendError(obj): class downloader(XiGuaLiveApi): playlist = None - def updRoomInfo(self): + def _updateRoomOnly(self): global broadcaster, isBroadcasting, updateTime, forceNotBroadcasting, forceNotDownload - super(downloader, self).updRoomInfo() + super(downloader, self)._updateRoomOnly() updateTime = datetime.strftime(datetime.now(), dt_format) broadcaster = self.roomLiver isBroadcasting = self.isLive @@ -276,6 +276,7 @@ class downloader(XiGuaLiveApi): if "stream_url" in self._rawRoomInfo: if self.playlist is None: self.playlist = None + streamUrl = None else: self.playlist = self._rawRoomInfo["stream_url"]["flv_pull_url"] self.playlist = self.playlist.replace("_uhd", "").replace("_sd", "").replace("_ld", "") diff --git a/WinMain.py b/WinMain.py index 294e088..771974b 100644 --- a/WinMain.py +++ b/WinMain.py @@ -191,7 +191,6 @@ if __name__ == "__main__": resetColor() time.sleep(60) api.updRoomInfo() - sys.exit() print("进入", api.roomLiver, "的直播间") os.system("title {}".format(api.getTitle())) print("=" * 30) diff --git a/api.py b/api.py index 04f0796..f9c75ef 100644 --- a/api.py +++ b/api.py @@ -145,8 +145,7 @@ class XiGuaLiveApi: """ if self.name is None or self.roomLiver is None: return False - if self.name in self.roomLiver: - return True + return True def _forceSearchUser(self): """