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

Compare commits

..

22 Commits

Author SHA1 Message Date
涵曦
a74546e8d6 bump: version 0.3.94 → 0.3.95 2025-10-26 12:22:08 +08:00
涵曦
d2fb5ab8d4 build: update static version 2025-10-26 12:22:08 +08:00
涵曦
e855ffd457 fix: 修复型号M01不能播放问题 2025-10-26 12:21:46 +08:00
Issues Docs [BOT]
71cdfd6cda Auto-Generate docs 🤖 2025-10-25 10:06:33 +00:00
涵曦
82f5602f4c bump: version 0.3.93 → 0.3.94 2025-10-25 18:02:44 +08:00
涵曦
11028a5812 build: update static version 2025-10-25 18:02:44 +08:00
涵曦
ecd7e90533 fix: 尝试修复登录问题 2025-10-25 18:02:25 +08:00
Issues Docs [BOT]
cfc34d1e97 Auto-Generate docs 🤖 2025-10-25 09:57:03 +00:00
涵曦
dc0101f94e bump: version 0.3.92 → 0.3.93 2025-10-25 17:54:38 +08:00
涵曦
912e8eecf2 build: update static version 2025-10-25 17:54:37 +08:00
涵曦
2dd1242532 fix: 尝试修复登录问题 2025-10-25 17:52:33 +08:00
Issues Docs [BOT]
7b947da5c1 Auto-Generate docs 🤖 2025-10-25 09:26:09 +00:00
涵曦
6f877d3203 bump: version 0.3.91 → 0.3.92 2025-10-25 17:24:08 +08:00
涵曦
07a78a81b6 build: update static version 2025-10-25 17:24:08 +08:00
Issues Docs [BOT]
e2950bbfd7 Auto-Generate docs 🤖 2025-10-25 09:01:17 +00:00
涵曦
df8105f34f build: 尝试修复打包问题 2025-10-25 16:59:06 +08:00
涵曦
8c95c85b00 build: 尝试修复打包问题 2025-10-25 16:21:39 +08:00
涵曦
ed1f1c6bf4 build: 尝试修复打包问题 2025-10-25 16:17:40 +08:00
涵曦
02edfe4bee Update README.md 2025-10-25 16:01:48 +08:00
涵曦
40f12f37e1 build: 修复打包问题 2025-10-25 15:56:21 +08:00
涵曦
7fb5ea4992 fix: 尝试解决登录失败问题 2025-10-25 15:44:35 +08:00
Issues Docs [BOT]
9bd99ab7ce Auto-Generate docs 🤖 2025-10-24 12:23:44 +00:00
20 changed files with 96 additions and 24 deletions

View File

@@ -19,6 +19,9 @@ jobs:
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx

View File

@@ -25,6 +25,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

View File

@@ -18,6 +18,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Setup PDM
uses: pdm-project/setup-pdm@v4

View File

@@ -51,6 +51,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Node.js
uses: actions/setup-node@v2

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "MiService"]
path = MiService
url = git@github.com:hanxi/MiService.git

View File

@@ -1,3 +1,27 @@
## v0.3.95 (2025-10-26)
### Fix
- 修复型号M01不能播放问题
## v0.3.94 (2025-10-25)
### Fix
- 尝试修复登录问题
## v0.3.93 (2025-10-25)
### Fix
- 尝试修复登录问题
## v0.3.92 (2025-10-25)
### Fix
- 尝试解决登录失败问题
## v0.3.91 (2025-10-24)
### Feat

View File

@@ -7,7 +7,8 @@ COPY xiaomusic/ ./xiaomusic/
COPY plugins/ ./plugins/
COPY holiday/ ./holiday/
COPY xiaomusic.py .
RUN pdm install --prod --no-editable
COPY MiService/ ./MiService/
RUN pdm install --prod --no-editable -v
FROM hanxi/xiaomusic:runtime
WORKDIR /app

View File

@@ -5,10 +5,12 @@ RUN pip install -U pdm
ENV PDM_CHECK_UPDATE=false
WORKDIR /app
COPY pyproject.toml README.md ./
COPY MiService/ ./MiService/
RUN pdm install --prod --no-editable
RUN pdm install --prod --no-editable -v
COPY xiaomusic/ ./xiaomusic/
COPY plugins/ ./plugins/
COPY holiday/ ./holiday/
COPY MiService/ ./MiService/
COPY xiaomusic.py .

1
MiService Submodule

Submodule MiService added at 898d7de17f

View File

@@ -271,8 +271,9 @@ docker build -t xiaomusic .
## 📢 讨论区
- [点击链接加入QQ频道【xiaomusic】](https://pd.qq.com/s/e2jybz0ss)
- [点击链接加入群聊【满 xiaomusic官方交流群1(小爱音箱)】 604526973](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=13St5PLVcTxYlWTAs_iAawazjtdD1l-a&authKey=dJWEpaT2fDBDpdUUOWj%2FLt6NS1ePBfShDfz7a6seNURi05VvVnAGQzXF%2FM%2F5HgIm&noverify=0&group_code=604526973)
- [点击链接加入群聊【xiaomusic官方交流群2(小爱音箱)】1021062499](https://qm.qq.com/q/BmVNqhDL3M)
- [点击链接加入群聊【满 xiaomusic官方交流群1】 604526973](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=13St5PLVcTxYlWTAs_iAawazjtdD1l-a&authKey=dJWEpaT2fDBDpdUUOWj%2FLt6NS1ePBfShDfz7a6seNURi05VvVnAGQzXF%2FM%2F5HgIm&noverify=0&group_code=604526973)
- [点击链接加入群聊【xiaomusic官方交流群2】1021062499](https://qm.qq.com/q/BmVNqhDL3M)
- [点击链接加入群聊【xiaomusic官方交流群3】 1072151477](https://qm.qq.com/q/lxIhquqbza)
- <https://github.com/hanxi/xiaomusic/issues>
- [微信群二维码](https://github.com/hanxi/xiaomusic/issues/86)

View File

@@ -1,5 +1,34 @@
# 版本日志
## v0.3.94 (2025-10-25)
### Fix
- 尝试修复登录问题
## v0.3.93 (2025-10-25)
### Fix
- 尝试修复登录问题
## v0.3.92 (2025-10-25)
### Fix
- 尝试解决登录失败问题
## v0.3.91 (2025-10-24)
### Feat
- 删掉没用的网页更新功能
- 获取对话记录接口修改
### Fix
- 尝试修复登录问题
## v0.3.90 (2025-10-22)
### Fix

View File

@@ -271,8 +271,9 @@ docker build -t xiaomusic .
## 📢 讨论区
- [点击链接加入QQ频道【xiaomusic】](https://pd.qq.com/s/e2jybz0ss)
- [点击链接加入群聊【满 xiaomusic官方交流群1(小爱音箱)】 604526973](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=13St5PLVcTxYlWTAs_iAawazjtdD1l-a&authKey=dJWEpaT2fDBDpdUUOWj%2FLt6NS1ePBfShDfz7a6seNURi05VvVnAGQzXF%2FM%2F5HgIm&noverify=0&group_code=604526973)
- [点击链接加入群聊【xiaomusic官方交流群2(小爱音箱)】1021062499](https://qm.qq.com/q/BmVNqhDL3M)
- [点击链接加入群聊【满 xiaomusic官方交流群1】 604526973](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=13St5PLVcTxYlWTAs_iAawazjtdD1l-a&authKey=dJWEpaT2fDBDpdUUOWj%2FLt6NS1ePBfShDfz7a6seNURi05VvVnAGQzXF%2FM%2F5HgIm&noverify=0&group_code=604526973)
- [点击链接加入群聊【xiaomusic官方交流群2】1021062499](https://qm.qq.com/q/BmVNqhDL3M)
- [点击链接加入群聊【xiaomusic官方交流群3】 1072151477](https://qm.qq.com/q/lxIhquqbza)
- <https://github.com/hanxi/xiaomusic/issues>
- [微信群二维码](https://github.com/hanxi/xiaomusic/issues/86)

View File

@@ -1,13 +1,12 @@
[project]
name = "xiaomusic"
version = "0.3.91"
version = "0.3.95"
description = "Play Music with xiaomi AI speaker"
authors = [
{name = "涵曦", email = "im.hanxi@gmail.com"},
]
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"
@@ -77,9 +77,9 @@ extend-immutable-calls = [
]
[tool.pdm.scripts]
lint = "ruff check ."
fmt = "ruff format ."
lintfmt = {composite = ["ruff check --fix .", "ruff format ."]}
lint = "ruff check . --exclude MiService"
fmt = "ruff format . --exclude MiService"
lintfmt = {composite = ["ruff check --fix . --exclude MiService", "ruff format . --exclude MiService"]}
[tool.commitizen]
name = "cz_conventional_commits"

View File

@@ -1 +1 @@
__version__ = "0.3.91"
__version__ = "0.3.95"

View File

@@ -6,9 +6,9 @@
<meta name="viewport" content="width=device-width">
<title>Debug For XiaoMusic</title>
<link rel="stylesheet" type="text/css" href="./main.css?version=1761308477">
<link rel="stylesheet" type="text/css" href="./main.css?version=1761452518">
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script src="./jquery-3.7.1.min.js?version=1761308477"></script>
<script src="./jquery-3.7.1.min.js?version=1761452518"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z09NC1K7ZW"></script>

View File

@@ -4,8 +4,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>歌曲下载工具</title>
<link rel="stylesheet" type="text/css" href="./main.css?version=1761308477">
<script src="./jquery-3.7.1.min.js?version=1761308477"></script>
<link rel="stylesheet" type="text/css" href="./main.css?version=1761452518">
<script src="./jquery-3.7.1.min.js?version=1761452518"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z09NC1K7ZW"></script>

View File

@@ -5,8 +5,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>小爱音箱操控面板</title>
<script src="./jquery-3.7.1.min.js?version=1761308477"></script>
<link rel="stylesheet" href="./main.css?version=1761308477">
<script src="./jquery-3.7.1.min.js?version=1761452518"></script>
<link rel="stylesheet" href="./main.css?version=1761452518">
<link rel="icon" href="./favicon.ico">
<!-- Google tag (gtag.js) -->
@@ -196,7 +196,7 @@
Powered by XiaoMusic
</div>
<script src="./md.js?version=1761308477">
<script src="./md.js?version=1761452518">
</script>
</body>

View File

@@ -5,7 +5,7 @@
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width">
<title>M3U to JSON Converter</title>
<link rel="stylesheet" type="text/css" href="./main.css?version=1761308477">
<link rel="stylesheet" type="text/css" href="./main.css?version=1761452518">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z09NC1K7ZW"></script>

View File

@@ -4,9 +4,9 @@
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width">
<title>小爱音箱操控面板</title>
<script src="./jquery-3.7.1.min.js?version=1761308477"></script>
<script src="./setting.js?version=1761308477"></script>
<link rel="stylesheet" type="text/css" href="./main.css?version=1761308477">
<script src="./jquery-3.7.1.min.js?version=1761452518"></script>
<script src="./setting.js?version=1761452518"></script>
<link rel="stylesheet" type="text/css" href="./main.css?version=1761452518">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z09NC1K7ZW"></script>

View File

@@ -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
@@ -2059,6 +2061,8 @@ class XiaoMusicDevice:
await self.xiaomusic.mina_service.text_to_speech(self.device_id, value)
except Exception as e:
self.log.exception(f"Execption {e}")
# 重新初始化
await self.xiaomusic.reinit()
# 同一组设备播放
async def group_player_play(self, url, name=""):