From ce2de7abc07fd72d9d0a8eb89d9f62f9956dff8d Mon Sep 17 00:00:00 2001 From: TNTcraftHIM Date: Mon, 31 Aug 2020 16:11:37 +0800 Subject: [PATCH] =?UTF-8?q?NeteaseMusic=E4=BF=AE=E6=94=B9=E6=AD=8C?= =?UTF-8?q?=E6=89=8B=E5=90=8D=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=B0=81=E9=9D=A2=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list.json | 4 ++-- neteasemusic.py | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/list.json b/list.json index 2c1d3a5..7b0a704 100644 --- a/list.json +++ b/list.json @@ -282,10 +282,10 @@ }, { "name": "neteasemusic", - "version": "3.2", + "version": "3.3", "section": "daily", "maintainer": "TNTcraftHIM", - "size": "26.3 kb", + "size": "26.4 kb", "supported": true, "des-short": "网易云搜/点歌", "des": "可以在线搜索并且快速点歌(可回复信息点歌),支持解锁VIP/灰色歌曲。命令:nem。" diff --git a/neteasemusic.py b/neteasemusic.py index c46dbd0..6245b57 100644 --- a/neteasemusic.py +++ b/neteasemusic.py @@ -174,8 +174,8 @@ async def nem(context): elif req['result']['songs'][0]['lMusic']: info['br'] = req['result']['songs'][0]['lMusic']['bitrate'] for j in range(len(req['result']['songs'][0]['artists'])): - info['artist'] += req['result']['songs'][0]['artists'][j]['name'] + ";" - info['artist'] = info['artist'][:-1] + info['artist'] += req['result']['songs'][0]['artists'][j]['name'] + "; " + info['artist'] = info['artist'][:-2] if title: title = "" else: @@ -367,9 +367,8 @@ async def nem(context): "GET", music['data']['url'], headers=headers) else: continue - - cap = info['artist'].replace( - ';', ', ') + " - " + "**" + info['title'] + "**" + performers = info['artist'].replace(';', ',') + cap = performers + " - " + "**" + info['title'] + "**" if ccimported is False: with open(name, 'wb') as f: @@ -400,7 +399,7 @@ async def nem(context): tag.title = info['title'] tag.album = info['album'] tag.images.remove('') - tag.images.set(3, imagedata, "image/jpeg", u"Cover") + tag.images.set(6, imagedata, "image/jpeg", u"Media") tag.save(version=eyed3.id3.ID3_DEFAULT_VERSION, encoding='utf-8') br = "" @@ -438,7 +437,7 @@ async def nem(context): force_document=False, thumb=imagedata, attributes=(DocumentAttributeAudio( - duration, False, info['title'], info['artist']),) + duration, False, info['title'], performers),) ) try: if reply.sender.is_self: