Skip to content

Commit

Permalink
chore: 优化提示
Browse files Browse the repository at this point in the history
  • Loading branch information
chen310 committed Mar 16, 2022
1 parent 39a05c0 commit c326ae8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"countrycode": "",
/* 填写密码或 32 位 md5 加密后的密码 */
"password": "",
/* 若都填写了账号密码和 cookie,优先使用 cookie */
/* 若都填写了账号密码和 cookie,会优先使用 cookie */
/* cookie 失效后才会使用账号密码登录 */
/* cookie 的格式为 MUSIC_U=xxxxxxxx; */
/* 填写方式详见 https://github.com/chen310/NeteaseCloudMusicTasks#%E8%B4%A6%E5%8F%B7%E5%AF%86%E7%A0%81 */
"cookie": "",
/* 填写国内IP,否则可能会有无法登录等问题出现,多个账号最好设置不同的IP */
/* 可填写本机IP,查看方法:https://www.ip138.com/ 填写显示的ip即可 */
Expand Down
2 changes: 2 additions & 0 deletions user.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def login_check(self, username, pwd='', cookie='', countrycode='', ip=''):
music.nickname = ''
if login_resp['code'] == -1:
music.loginerror = ''
elif login_resp['code'] == -462:
music.loginerror = '暂时无法通过账号密码登录,请在配置文件中填写 cookie 进行登录'
else:
music.loginerror = login_resp.get('msg', str(login_resp))

Expand Down

0 comments on commit c326ae8

Please sign in to comment.