neteasedown fix a bug

This commit is contained in:
xtaodada 2021-12-04 18:05:19 +08:00
parent 4425b76ae0
commit bcbb12683c
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 5 additions and 5 deletions

View File

@ -292,7 +292,7 @@
},
{
"name": "neteasedown",
"version": "1.201",
"version": "1.202",
"section": "daily",
"maintainer": "xtaodada",
"size": "6.7 kb",

View File

@ -85,6 +85,10 @@ async def ned(context):
# 使用方法
await context.edit(f"**使用方法:** `-{alias_command('ned')}" + " {关键词/id}/{login <账号> <密码>}`")
return
# 加载登录信息
if isfile(f"data{sep}session.ncm"):
with open(f"data{sep}session.ncm") as f:
SetCurrentSession(LoadSessionFromString(f.read()))
# 处理账号登录
if context.parameter[0] == "login":
# 显示登录信息
@ -121,10 +125,6 @@ async def ned(context):
remove(f"data{sep}{i}")
await context.edit("**已清除缓存**")
return
# 加载登录信息
if isfile(f"data{sep}session.ncm"):
with open(f"data{sep}session.ncm") as f:
SetCurrentSession(LoadSessionFromString(f.read()))
# 搜索歌曲
song_id = context.arguments
# id