diff --git a/README.md b/README.md index 1e9e299..01b67b9 100644 --- a/README.md +++ b/README.md @@ -247,6 +247,10 @@ Telegram:[@lgc2333](https://t.me/lgc2333) ## 📝 更新日志 +### 1.1.4 + +- 修复一个歌词合并的小问题 + ### 1.1.3 - 修复过长歌词多行不居中的问题 diff --git a/nonebot_plugin_multincm/__init__.py b/nonebot_plugin_multincm/__init__.py index 7ac9d64..809bed8 100644 --- a/nonebot_plugin_multincm/__init__.py +++ b/nonebot_plugin_multincm/__init__.py @@ -29,7 +29,7 @@ "▶ Bot 会自动解析你发送的网易云链接\n" if config.ncm_auto_resolve else "" ) -__version__ = "1.1.3.post1" +__version__ = "1.1.4.post514" __plugin_meta__ = PluginMetadata( name="MultiNCM", description="网易云多选点歌", diff --git a/nonebot_plugin_multincm/utils/lrc_parser.py b/nonebot_plugin_multincm/utils/lrc_parser.py index 3941175..0a383dd 100644 --- a/nonebot_plugin_multincm/utils/lrc_parser.py +++ b/nonebot_plugin_multincm/utils/lrc_parser.py @@ -94,6 +94,9 @@ def merge_lrc( merged: List[List[LrcLine]] = [[x] for x in main_lyric] for merged_line in merged: main_line = merged_line[0] + if not main_line.lrc: + continue + main_time = main_line.time for sub_lrc in sub_lyrics: @@ -103,7 +106,7 @@ def merge_lrc( if (main_time - threshold) <= line.time < (main_time + threshold): for _ in range(i + 1): - it = sub_lrc.pop(0) + it = sub_lrc.pop(0) # noqa: B909 if it.lrc: merged_line.append(it) break