From c3643211545805b3ec39afa8464999b4c55dab9c Mon Sep 17 00:00:00 2001 From: shaonianzhentan Date: Mon, 15 May 2023 15:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=82=E5=B8=B8=E6=97=B6?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/ha_cloud_music/cloud_music.py | 4 ++-- custom_components/ha_cloud_music/manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/ha_cloud_music/cloud_music.py b/custom_components/ha_cloud_music/cloud_music.py index 7810c2f..83aa265 100644 --- a/custom_components/ha_cloud_music/cloud_music.py +++ b/custom_components/ha_cloud_music/cloud_music.py @@ -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 # 获取音乐链接 diff --git a/custom_components/ha_cloud_music/manifest.json b/custom_components/ha_cloud_music/manifest.json index 5a40d73..9f1a6f9 100644 --- a/custom_components/ha_cloud_music/manifest.json +++ b/custom_components/ha_cloud_music/manifest.json @@ -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": [