Skip to content

Commit db8a8e9

Browse files
committed
Version 0.1.2
Implement login fix from master branch (fixes #66) Fix `SetRectifySongId` errorneously using non-async methods (fixes #65)
1 parent e3b6170 commit db8a8e9

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

pyncm_async/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""PyNCM-Async 网易云音乐 Python 异步 API / 下载工具"""
33
__VERSION_MAJOR__ = 0
44
__VERSION_MINOR__ = 1
5-
__VERSION_PATCH__ = 1
5+
__VERSION_PATCH__ = 2
66

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

@@ -95,7 +95,7 @@ def __init__(self, *args, **kwargs):
9595
}
9696
self.eapi_config = {
9797
"os": "ios",
98-
"appver": "",
98+
"appver": "9.0.0",
9999
"osver": "",
100100
"deviceId": DEVICE_ID_DEFAULT,
101101
}

pyncm_async/apis/cloud.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def SetPublishCloudResource(songid):
179179
}
180180

181181

182-
def SetRectifySongId(oldSongId, newSongId,session=None):
182+
async def SetRectifySongId(oldSongId, newSongId,session=None):
183183
"""移动端 - 歌曲纠偏
184184
185185
Args:
@@ -189,11 +189,8 @@ def SetRectifySongId(oldSongId, newSongId,session=None):
189189
Returns:
190190
dict
191191
"""
192-
return (
193-
(session or GetCurrentSession())
194-
.get(
192+
resp = await (session or GetCurrentSession()).get(
195193
"/api/cloud/user/song/match",
196194
params={"songId": str(oldSongId), "adjustSongId": str(newSongId)},
197-
)
198-
.json()
199195
)
196+
return resp.json()

0 commit comments

Comments
 (0)