1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2025-12-05 14:42:50 +08:00

fix: 尝试修复获取对话记录失败的问题 close #362

This commit is contained in:
涵曦
2025-01-16 11:35:45 +08:00
parent a317337a01
commit e9253fed57
2 changed files with 4 additions and 1 deletions

2
.gitignore vendored
View File

@@ -169,5 +169,5 @@ setting.json
.DS_Store .DS_Store
cache cache
tmp/ tmp/
xiaomusic.log.txt xiaomusic.log.txt*
node_modules node_modules

View File

@@ -334,6 +334,9 @@ class XiaoMusic:
# 检查响应状态码 # 检查响应状态码
if r.status != 200: if r.status != 200:
self.log.warning(f"Request failed with status {r.status}") self.log.warning(f"Request failed with status {r.status}")
# fix #362
if i == 2 and r.status == 401:
await self.init_all_data(self.session)
continue continue
except asyncio.CancelledError: except asyncio.CancelledError: