mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-13 17:39:52 +08:00
fix: 启动 AB 无法初始化 QB 的问题。
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -59,8 +59,3 @@ def eps_complete():
|
||||
bd.update_list(datas)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from module.conf import setup_logger
|
||||
|
||||
setup_logger()
|
||||
eps_complete()
|
||||
|
||||
Reference in New Issue
Block a user