mirror of
https://github.com/hanxi/xiaomusic.git
synced 2025-12-06 14:52:50 +08:00
fix: 尝试解决登录失败问题
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "MiService"]
|
||||
path = MiService
|
||||
url = git@github.com:hanxi/MiService.git
|
||||
1
MiService
Submodule
1
MiService
Submodule
Submodule MiService added at 968d8bd37a
@@ -7,7 +7,6 @@ authors = [
|
||||
]
|
||||
dependencies = [
|
||||
"aiohttp>=3.8.6",
|
||||
"miservice-fork>=2.7.0",
|
||||
"watchdog>=6.0.0",
|
||||
"mutagen>=1.47.0",
|
||||
"yt-dlp[default]>=2024.12.1.232904.dev0",
|
||||
@@ -24,7 +23,8 @@ dependencies = [
|
||||
"sentry-sdk[fastapi]==1.45.1",
|
||||
"python-socketio>=5.12.1",
|
||||
"pyjwt>=2.10.1",
|
||||
"fake-useragent>=2.2.0",
|
||||
"fake-useragent>=2.2.0",
|
||||
"miservice-fork @ file:///${PROJECT_ROOT}/MiService",
|
||||
]
|
||||
requires-python = ">=3.10"
|
||||
readme = "README.md"
|
||||
|
||||
@@ -245,6 +245,7 @@ class XiaoMusic:
|
||||
self.mi_token_home = os.path.join(self.config.conf_path, ".mi.token")
|
||||
is_need_login = await self.need_login()
|
||||
if is_need_login:
|
||||
self.log.info("try login")
|
||||
await self.login_miboy(session)
|
||||
else:
|
||||
self.log.info("already logined")
|
||||
@@ -285,6 +286,7 @@ class XiaoMusic:
|
||||
self.miio_service = MiIOService(account)
|
||||
self.login_acount = self.config.account
|
||||
self.login_password = self.config.password
|
||||
self.log.info(f"登录完成. {self.login_acount}")
|
||||
except Exception as e:
|
||||
self.mina_service = None
|
||||
self.miio_service = None
|
||||
|
||||
Reference in New Issue
Block a user