Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Nov 29, 2024
1 parent 1231ac9 commit b9f0728
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ Telegram:[@lgc2333](https://t.me/lgc2333)

## 📝 更新日志

### 1.1.4

- 修复一个歌词合并的小问题

### 1.1.3

- 修复过长歌词多行不居中的问题
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_multincm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="网易云多选点歌",
Expand Down
5 changes: 4 additions & 1 deletion nonebot_plugin_multincm/utils/lrc_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit b9f0728

Please sign in to comment.