modify common

This commit is contained in:
Jerry Yan 2020-01-06 08:01:30 +08:00
parent 17f0f4aa4e
commit fbeff099d0

View File

@ -98,9 +98,7 @@ def updateNetwork():
def getTimeDelta(a, b):
sec = (a - b).seconds
ms = (a - b).microseconds
return sec + (ms / 100000.0)
return (a - b).total_seconds()
def _doClean(_force=False):
@ -312,9 +310,9 @@ class downloader(XiGuaLiveApi):
def updRoomInfo(self, force=False):
doClean()
_result = super(downloader, self).updRoomInfo(force)
if _result:
global broadcaster, isBroadcasting, updateTime
updateTime = datetime.strftime(self._updRoomAt, dt_format)
if _result:
broadcaster = self.broadcaster
isBroadcasting = self.isLive
if self.isLive: