代码部分优化(可能是负优化,待测试)

This commit is contained in:
2019-05-16 20:55:43 +08:00
parent 89e9410810
commit a3d9e17a71
3 changed files with 165 additions and 152 deletions

View File

@ -255,7 +255,6 @@ def appendError(obj):
class downloader(XiGuaLiveApi):
files = []
playlist = None
def updRoomInfo(self):
@ -270,18 +269,20 @@ class downloader(XiGuaLiveApi):
forceNotDownload = False
forceNotBroadcasting = False
self.playlist = False
self.files = []
def updPlayList(self):
global streamUrl
if self.isLive:
if "stream_url" in self._rawRoomInfo:
if self.playlist is None:
self.playlist = False
self.playlist = None
else:
self.playlist = self._rawRoomInfo["stream_url"]["flv_pull_url"]
self.playlist = self.playlist.replace("_uhd", "").replace("_sd", "").replace("_ld", "")
streamUrl = self.playlist
else:
streamUrl = None
self.playlist = None
def onLike(self, user):
pass