diff --git a/nonebot_plugin_multincm/__init__.py b/nonebot_plugin_multincm/__init__.py index f06efb6..4d1f7d4 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.0" +__version__ = "1.1.0.post1" __plugin_meta__ = PluginMetadata( name="MultiNCM", description="网易云多选点歌", diff --git a/nonebot_plugin_multincm/interaction/message/song_card.py b/nonebot_plugin_multincm/interaction/message/song_card.py index 8751f21..5612311 100644 --- a/nonebot_plugin_multincm/interaction/message/song_card.py +++ b/nonebot_plugin_multincm/interaction/message/song_card.py @@ -7,12 +7,11 @@ from nonebot_plugin_alconna.uniseg import UniMessage from ...config import config -from ...data_source import BaseSong +from ...data_source import BaseSong, SongInfo -async def sign_music_card(song: BaseSong) -> str: +async def sign_music_card(info: SongInfo) -> str: assert config.ncm_card_sign_url - info = await song.get_info() async with AsyncClient( follow_redirects=True, timeout=config.ncm_card_sign_timeout, @@ -33,14 +32,14 @@ async def sign_music_card(song: BaseSong) -> str: async def send_song_card_msg(song: BaseSong): + info = await song.get_info() if config.ncm_card_sign_url: with warning_suppress( f"Failed to send signed card for song {song}, fallback to MusicShare seg", ): - return await UniMessage.hyper("json", await sign_music_card(song)).send( + return await UniMessage.hyper("json", await sign_music_card(info)).send( fallback=False, ) - info = await song.get_info() return await UniMessage( MusicShare( kind=MusicShareKind.NeteaseCloudMusic,