接口异常时通知提醒
This commit is contained in:
parent
70a58da617
commit
c364321154
|
@ -113,8 +113,8 @@ class CloudMusic():
|
|||
# 网易云音乐接口
|
||||
async def netease_cloud_music(self, url):
|
||||
res = await http_get(self.api_url + url, self.userinfo.get('cookie', {}))
|
||||
if res.get('code') == 301 and res.get('msg') == '需要登录':
|
||||
self.logout()
|
||||
if res.get('code') != 200:
|
||||
self.notification(res.get('msg'))
|
||||
return res
|
||||
|
||||
# 获取音乐链接
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"domain": "ha_cloud_music",
|
||||
"name": "\u4E91\u97F3\u4E50",
|
||||
"version": "2023.5.12",
|
||||
"version": "2023.5.15",
|
||||
"config_flow": true,
|
||||
"documentation": "https://github.com/shaonianzhentan/ha_cloud_music",
|
||||
"requirements": [
|
||||
|
|
Loading…
Reference in New Issue