mirror of
https://github.com/studio-neptune/yuuki.git
synced 2024-11-10 17:14:06 +08:00
Release v6.5.2
This commit is contained in:
parent
7343f1758b
commit
3f749bb8b5
2 changed files with 12 additions and 3 deletions
|
@ -193,6 +193,7 @@ class Yuuki_Data:
|
|||
for Type in self.DataType:
|
||||
with self.file(Type, "w", "Data") as f:
|
||||
f.write(json.dumps(self.Data[Type]))
|
||||
return self.getData(["Global","Power"])
|
||||
|
||||
def updateData(self, path, data):
|
||||
if self.threading:
|
||||
|
|
|
@ -110,7 +110,6 @@ class Yuuki:
|
|||
|
||||
self.data = Yuuki_Data(self.Threading)
|
||||
|
||||
self.data.updateData(["Global","Power"], True)
|
||||
self.data.updateData(["Global","GroupJoined"], self.client.getGroupIdsJoined())
|
||||
self.data.updateData(["Global","SecurityService"], self.YuukiConfigs["SecurityService"])
|
||||
|
||||
|
@ -802,7 +801,10 @@ class Yuuki:
|
|||
if "LastResetLimitTime" not in self.data.getData(["Global"]):
|
||||
self.data.updateData(["Global", "LastResetLimitTime"], None)
|
||||
|
||||
while self.data.getData(["Global","Power"]):
|
||||
Power = True
|
||||
self.data.updateData(["Global","Power"], Power)
|
||||
|
||||
while Power:
|
||||
try:
|
||||
if time.localtime().tm_hour != self.data.getData(["Global", "LastResetLimitTime"]):
|
||||
self.limitReset()
|
||||
|
@ -828,7 +830,13 @@ class Yuuki:
|
|||
if len(cacheOperations) > 1:
|
||||
self.revision = max(cacheOperations[-1].revision, cacheOperations[-2].revision)
|
||||
|
||||
self.data.syncData()
|
||||
Power = self.data.syncData()
|
||||
|
||||
except requests.exceptions.ConnectionError:
|
||||
Power = False
|
||||
|
||||
except SystemExit:
|
||||
Power = False
|
||||
|
||||
except KeyboardInterrupt:
|
||||
self.exit()
|
||||
|
|
Loading…
Reference in a new issue