mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
fix: change logger warning to debug for empty Discord configs
This commit is contained in:
@@ -182,7 +182,7 @@ class DiscordModule(_ModuleBase, _MessageBase[Discord]):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not configs:
|
if not configs:
|
||||||
logger.warning("[Discord] get_configs() 返回空,没有可用的 Discord 配置")
|
logger.debug("[Discord] get_configs() 返回空,没有可用的 Discord 配置")
|
||||||
return
|
return
|
||||||
|
|
||||||
for conf in configs.values():
|
for conf in configs.values():
|
||||||
|
|||||||
@@ -489,7 +489,7 @@ class Discord:
|
|||||||
return spans
|
return spans
|
||||||
|
|
||||||
def _find_colon_index(s: str, m: re.Match) -> Optional[int]:
|
def _find_colon_index(s: str, m: re.Match) -> Optional[int]:
|
||||||
segment = s[m.start() : m.end()]
|
segment = s[m.start(): m.end()]
|
||||||
for i, ch in enumerate(segment):
|
for i, ch in enumerate(segment):
|
||||||
if ch in (":", ":"):
|
if ch in (":", ":"):
|
||||||
return m.start() + i
|
return m.start() + i
|
||||||
@@ -546,7 +546,7 @@ class Discord:
|
|||||||
last_end = 0
|
last_end = 0
|
||||||
for m in matches:
|
for m in matches:
|
||||||
# 追加匹配前的非空文本到描述
|
# 追加匹配前的非空文本到描述
|
||||||
prefix = line[last_end : m.start()].strip(" ,,;;。、")
|
prefix = line[last_end: m.start()].strip(" ,,;;。、")
|
||||||
# 仅当前缀不全是分隔符/空白时才记录
|
# 仅当前缀不全是分隔符/空白时才记录
|
||||||
if prefix and prefix.strip(" ,,;;。、"):
|
if prefix and prefix.strip(" ,,;;。、"):
|
||||||
desc_lines.append(prefix)
|
desc_lines.append(prefix)
|
||||||
|
|||||||
Reference in New Issue
Block a user