包含hd_chinese_subtitles

This commit is contained in:
liuwei
2025-09-10 16:56:05 +08:00
parent 20a2400891
commit 1ad8015a8d
2 changed files with 7 additions and 7 deletions

View File

@@ -71,7 +71,7 @@ class FanhaoSearchPlugin(MessagePluginInterface):
)
self.mongo_db_name = cfg.get("db", "sehuatang")
self.collections = cfg.get(
"collections", ["asia_codeless_originate", "asia_mosaic_originate","4k_video"]
"collections", ["hd_chinese_subtitles", "asia_codeless_originate", "asia_mosaic_originate", "4k_video"]
)
self.search_fields = cfg.get("search_fields", ["number"]) # 可能的字段名
@@ -166,7 +166,7 @@ class FanhaoSearchPlugin(MessagePluginInterface):
queries = self._build_queries(code_upper)
self.LOG.debug(f"[{self.name}] 标准化番号={code_upper},查询字段={self.search_fields}")
for idx, query in enumerate(queries):
self.LOG.debug(f"[{self.name}] 执行查询({idx+1}/{len(queries)}): {query}")
self.LOG.debug(f"[{self.name}] 执行查询({idx + 1}/{len(queries)}): {query}")
for coll_name in self.collections:
try:
coll = self.mongo_db.get_collection(coll_name)
@@ -236,7 +236,8 @@ class FanhaoSearchPlugin(MessagePluginInterface):
# 参数检查
parts = content.split(" ")
if len(parts) < 2:
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}", sender)
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}",
sender)
return False, "命令格式错误"
if roomid and gbm.get_group_permission(roomid, self.feature) == PermissionStatus.DISABLED:
@@ -248,7 +249,8 @@ class FanhaoSearchPlugin(MessagePluginInterface):
f"[{self.name}] 收到查询 command={command} raw='{raw_code}' normalized='{user_code}' db={self.mongo_db_name} collections={self.collections}"
)
if not user_code:
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}", sender)
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}",
sender)
return False, "命令格式错误"
try:
@@ -269,5 +271,3 @@ class FanhaoSearchPlugin(MessagePluginInterface):
def get_plugin():
return FanhaoSearchPlugin()