Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kitUIN committed May 13, 2022
1 parent 575152e commit 543c2d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nonebot-plugin-ncm/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def detail(self, ids: list) -> list:

async def search_song(self, keyword: str, limit: int = 1) -> int: # 搜索歌曲
res = self.api.cloudsearch.GetSearchResult(keyword=keyword, stype=SONG, limit=limit)
logger.debug(f"搜索歌曲{keyword},返回结果:{res.json()}")
data = res.json()["result"]["songs"]
logger.debug(f"搜索歌曲{keyword},返回结果:{res}")
data = res["result"]["songs"]
if data:
return data[0]["id"]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-ncm"
version = "1.3.4"
version = "1.3.5"
description = "基于go-cqhttp与nonebot2的 网易云 无损音乐下载"
license = "Apache License 2.0"
authors = ["kitUIN <[email protected]>"]
Expand Down

0 comments on commit 543c2d1

Please sign in to comment.