From bcbb12683ccdc08f095be678fb9e3de69ade4979 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 4 Dec 2021 18:05:19 +0800 Subject: [PATCH] neteasedown fix a bug --- list.json | 2 +- neteasedown.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/list.json b/list.json index dfa035c..62e229a 100644 --- a/list.json +++ b/list.json @@ -292,7 +292,7 @@ }, { "name": "neteasedown", - "version": "1.201", + "version": "1.202", "section": "daily", "maintainer": "xtaodada", "size": "6.7 kb", diff --git a/neteasedown.py b/neteasedown.py index 4a55af5..0ca4ba3 100644 --- a/neteasedown.py +++ b/neteasedown.py @@ -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