fix: 启动 AB 无法初始化 QB 的问题。

This commit is contained in:
EstrellaXD
2023-06-08 20:18:43 +08:00
parent f11eaecd0d
commit f1359e1786
3 changed files with 8 additions and 12 deletions

View File

@@ -2,7 +2,8 @@ import os.path
from module.downloader import DownloadClient
from module.network import RequestContent
from module.conf import settings, DATA_PATH
from module.conf import settings
from module.models import Config
class Checker:
@@ -46,9 +47,7 @@ class Checker:
@staticmethod
def check_first_run() -> bool:
token_exist = False if settings.rss_parser.token in ["", "token"] else True
if settings.rss_parser.enable:
if token_exist:
return False
else:
return True
if settings.dict() == Config().dict():
return True
else:
return False

View File

@@ -19,6 +19,8 @@ class RSSThread(ProgramStatus):
)
def rss_loop(self):
with DownloadClient() as client:
client.init_downloader()
while not self.stop_event.is_set():
# Analyse RSS
with BangumiDatabase() as db:

View File

@@ -59,8 +59,3 @@ def eps_complete():
bd.update_list(datas)
if __name__ == "__main__":
from module.conf import setup_logger
setup_logger()
eps_complete()