Skip to content

Commit

Permalink
Version 0.1.2
Browse files Browse the repository at this point in the history
Implement login fix from master branch (fixes #66)
Fix `SetRectifySongId` errorneously using non-async methods (fixes #65)
  • Loading branch information
mos9527 committed Sep 23, 2024
1 parent e3b6170 commit db8a8e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pyncm_async/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""PyNCM-Async 网易云音乐 Python 异步 API / 下载工具"""
__VERSION_MAJOR__ = 0
__VERSION_MINOR__ = 1
__VERSION_PATCH__ = 1
__VERSION_PATCH__ = 2

__version__ = '%s.%s.%s' % (__VERSION_MAJOR__,__VERSION_MINOR__,__VERSION_PATCH__)

Expand Down Expand Up @@ -95,7 +95,7 @@ def __init__(self, *args, **kwargs):
}
self.eapi_config = {
"os": "ios",
"appver": "",
"appver": "9.0.0",
"osver": "",
"deviceId": DEVICE_ID_DEFAULT,
}
Expand Down
9 changes: 3 additions & 6 deletions pyncm_async/apis/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def SetPublishCloudResource(songid):
}


def SetRectifySongId(oldSongId, newSongId,session=None):
async def SetRectifySongId(oldSongId, newSongId,session=None):
"""移动端 - 歌曲纠偏
Args:
Expand All @@ -189,11 +189,8 @@ def SetRectifySongId(oldSongId, newSongId,session=None):
Returns:
dict
"""
return (
(session or GetCurrentSession())
.get(
resp = await (session or GetCurrentSession()).get(
"/api/cloud/user/song/match",
params={"songId": str(oldSongId), "adjustSongId": str(newSongId)},
)
.json()
)
return resp.json()

0 comments on commit db8a8e9

Please # to comment.