Esempio n. 1
0
 def disable_engine(self, engine: str) -> bool:
     """禁用某个动漫搜索引擎, engine: api.engines.xxx"""
     if engine not in self._engines:
         logger.info(f"Anime Engine {engine} has already disabled")
         return True  # 本来就没启用
     self._engines.pop(engine)
     logger.info(f"Disabled Anime Engine: {engine}")
     return GLOBAL_CONFIG.disable_engine(engine)
Esempio n. 2
0
 def disable_danmaku(self, danmaku: str) -> bool:
     """禁用某个弹幕搜索引擎, engine: api.danmaku.xxx"""
     if danmaku not in self._danmaku_engine:
         logger.info(f"Danmaku Engine {danmaku} has already disabled")
         return True  # 本来就没启用
     self._danmaku_engine.pop(danmaku)
     logger.info(f"Disabled Danmaku Engine: {danmaku}")
     return GLOBAL_CONFIG.disable_engine(danmaku)