From 03f5fcaf45c00fa210a5cefd2f2d71b19c5b9a51 Mon Sep 17 00:00:00 2001 From: TNTcraftHIM Date: Thu, 27 Aug 2020 17:23:40 +0800 Subject: [PATCH] =?UTF-8?q?neteasemusic=E5=B0=8F=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list.json | 4 ++-- neteasemusic.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/list.json b/list.json index e86ccb9..1711182 100644 --- a/list.json +++ b/list.json @@ -282,10 +282,10 @@ }, { "name": "neteasemusic", - "version": "1.3", + "version": "1.4", "section": "daily", "maintainer": "TNTcraftHIM", - "size": "21.5 kb", + "size": "21.6 kb", "supported": true, "des-short": "网易云点歌", "des": "可以在线搜索并且快速点歌,歌曲信息齐全,支持直接回复点歌。命令:nem。" diff --git a/neteasemusic.py b/neteasemusic.py index b8ca22d..fbade8c 100644 --- a/neteasemusic.py +++ b/neteasemusic.py @@ -351,17 +351,19 @@ async def nem(context): await bot.send_message(context.chat_id, f"【{info['title']}】\n" + "歌曲获取失败,可能歌曲为VIP专属,或受到地区版权限制。\n" + res, parse_mode='html', link_preview=True) return if imported is True: + await context.edit(f"{title}信息导入中 . . .") imagedata = requests.get( info['albumpic'], headers=headers).content - tag = eyed3.load(name).tag + tag = eyed3.load(name) + tag.initTag() + tag = tag.tag tag.artist = info['artist'] tag.title = info['title'] tag.album = info['album'] tag.images.remove('') - tag.images.set(3, imagedata, "image/jpeg", - u"Cover") + tag.images.set(3, imagedata, "image/jpeg", u"Cover") tag.save( - version=eyed3.id3.ID3_DEFAULT_VERSION, encoding='utf-8') + name, version=eyed3.id3.ID3_DEFAULT_VERSION, encoding='utf-8') await context.edit(f"{title}上传中 . . .") await context.client.send_file( context.chat_id,