mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 07:08:18 +00:00
neteasedown fix bug
This commit is contained in:
parent
9b17beac93
commit
c2c0831d8a
@ -292,7 +292,7 @@
|
||||
},
|
||||
{
|
||||
"name": "neteasedown",
|
||||
"version": "1.11",
|
||||
"version": "1.12",
|
||||
"section": "daily",
|
||||
"maintainer": "xtaodada",
|
||||
"size": "15.6 kb",
|
||||
|
@ -209,6 +209,7 @@ def netease_single(id):
|
||||
data=data,
|
||||
).get("data", [])
|
||||
if len(res_data_detail) > 0 and len(res_data) > 0:
|
||||
try:
|
||||
item = res_data_detail[0]
|
||||
singers = [s.get("name", "") for s in item.get("ar", {})]
|
||||
song = {"id": item.get("id", ""),
|
||||
@ -221,6 +222,8 @@ def netease_single(id):
|
||||
"song_url": res_data[0].get("url", ""),
|
||||
"rate": int(res_data[0].get("br", 0) / 1000)}
|
||||
return song
|
||||
except TypeError:
|
||||
raise DataError("Get song detail failed.")
|
||||
else:
|
||||
raise DataError("Get song detail failed.")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user