NeteaseMusic修改歌手名显示逻辑,封面显示问题

This commit is contained in:
TNTcraftHIM 2020-08-31 16:11:37 +08:00
parent c4b5bba457
commit ce2de7abc0
2 changed files with 8 additions and 9 deletions

View File

@ -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。"

View File

@ -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: