diff --git a/libs/data.py b/libs/data.py index 3162418..a213325 100644 --- a/libs/data.py +++ b/libs/data.py @@ -7,7 +7,7 @@ from .core.ttypes import OpType from .thread_control import Yuuki_Thread class Yuuki_Data: - def __init__(self, threading=False): + def __init__(self, threading): self.threading = threading self.ThreadControl = Yuuki_Thread() diff --git a/libs/yuuki.py b/libs/yuuki.py index 3ed8673..a97fc63 100644 --- a/libs/yuuki.py +++ b/libs/yuuki.py @@ -38,10 +38,10 @@ class Yuuki_Settings: } class Yuuki: - def __init__(self, Yuuki_Settings, Yuuki_Connection): + def __init__(self, Yuuki_Settings, Yuuki_Connection, threading=False): self.YuukiConfigs = Yuuki_Settings.config - self.Threading = False + self.Threading = threading self.Thread_Control = Yuuki_MultiPross() self.Seq = self.YuukiConfigs["Seq"] @@ -50,7 +50,7 @@ class Yuuki: self.KickLimit = self.YuukiConfigs["Hour_KickLimit"] self.CancelLimit = self.YuukiConfigs["Hour_CancelLimit"] - self.data = Yuuki_Data() + self.data = Yuuki_Data(self.Threading) self.i18n = Yuuki_LangSetting(self.YuukiConfigs["Default_Language"]) self.LINE_Media_server = "https://obs.line-apps.com" @@ -612,7 +612,7 @@ class Yuuki: # Main - def Main(self, threading=False): + def Main(self): NoWork = 0 fetchNum = 50 catchedNews = [] @@ -620,9 +620,6 @@ class Yuuki: sybExec = self.Thread_Exec - if threading: - self.Threading = threading - if "LastResetLimitTime" not in self.data.getData("Global"): self.data.getData("Global")["LastResetLimitTime"] = None