Beispiel #1
0
 def enable_engine(self, engine: str) -> bool:
     """启用某个动漫搜索引擎"""
     if engine in self._engines:
         logger.info(f"Anime Engine {engine} has already loaded")
         return True  # 已经启用了
     self._load_engine(engine)  # 动态加载引擎
     return GLOBAL_CONFIG.enable_engine(engine)  # 更新配置文件
Beispiel #2
0
 def enable_danmaku(self, danmaku: str) -> bool:
     """启用某个弹幕搜索引擎"""
     if danmaku in self._danmaku_engine:
         logger.info(f"Danmaku Engine {danmaku} has already loaded")
         return True  # 已经启用了
     self._load_danmaku(danmaku)  # 动态加载引擎
     return GLOBAL_CONFIG.enable_engine(danmaku)  # 更新配置文件