Fix online bug

This commit is contained in:
xtaodada 2022-03-25 08:45:47 +08:00
parent 09b7e00e88
commit cee3d6ecca
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ class Vtuber:
self.face: str = data["face"] self.face: str = data["face"]
self.follower: int = data["follower"] self.follower: int = data["follower"]
self.liveStatus: bool = data["liveStatus"] self.liveStatus: bool = data["liveStatus"]
self.online: Optional[int, bool] = data["online"] self.online: int = data["online"] if data["online"] else 0
self.notice: str = data["notice"].replace(r"\n", "\n") self.notice: str = data["notice"].replace(r"\n", "\n")
self.time: int = data["time"] self.time: int = data["time"]
self.timeStr: str = strf_time(self.time) self.timeStr: str = strf_time(self.time)

View File

@ -60,7 +60,7 @@ async def run_every_10_minute():
await sleep(uniform(0.5, 2.0)) await sleep(uniform(0.5, 2.0))
@scheduler.scheduled_job("cron", hour="*/12", id="0") @scheduler.scheduled_job("cron", hour="*/12", minute="0", id="0")
async def run_every_12_hour(): async def run_every_12_hour():
await update_info() await update_info()