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:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -169,5 +169,5 @@ setting.json
|
||||
.DS_Store
|
||||
cache
|
||||
tmp/
|
||||
xiaomusic.log.txt
|
||||
xiaomusic.log.txt*
|
||||
node_modules
|
||||
|
||||
@@ -334,6 +334,9 @@ class XiaoMusic:
|
||||
# 检查响应状态码
|
||||
if r.status != 200:
|
||||
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
|
||||
|
||||
except asyncio.CancelledError:
|
||||
|
||||
Reference in New Issue
Block a user