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

Compare commits

..

44 Commits

Author SHA1 Message Date
涵曦
4e3e127767 bump: version 0.3.65 → 0.3.66 2024-12-26 08:43:45 +08:00
涵曦
dafd2cec05 build: update static version 2024-12-26 08:43:44 +08:00
涵曦
59e9191f70 style: 清理无效代码 2024-12-25 16:57:21 +08:00
涵曦
f7286269af fix: 修复歌曲批量重命名的问题 2024-12-25 16:20:06 +08:00
涵曦
d98652fe5d fix: 修复自定义歌单删除后没刷新歌单列表 2024-12-25 09:48:19 +08:00
Issues Docs [BOT]
497dd07030 Auto-Generate docs 🤖 2024-12-25 00:48:00 +00:00
涵曦
6cbec5bbff fix: 尝试修复更新失败问题 2024-12-25 08:38:44 +08:00
Issues Docs [BOT]
c46c652e5d Auto-Generate docs 🤖 2024-12-24 13:04:34 +00:00
涵曦
1fbbae5f1c bump: version 0.3.64 → 0.3.65 2024-12-24 21:03:03 +08:00
涵曦
ffd04fab68 build: update static version 2024-12-24 21:03:02 +08:00
Issues Docs [BOT]
51dfe70a87 Auto-Generate docs 🤖 2024-12-23 08:43:15 +00:00
涵曦
956c569b93 docs: 修改文档代理地址 2024-12-23 16:41:12 +08:00
涵曦
617a961816 fix: 处理图像报错 2024-12-22 18:14:58 +08:00
涵曦
b37b6fd57c fix: 修改歌单名字漏更新歌单列表 2024-12-22 17:59:19 +08:00
涵曦
c09baaac15 fix: 修复获取自定义歌单接口报错 2024-12-22 13:15:35 +08:00
Issues Docs [BOT]
7ded7a08dd Auto-Generate docs 🤖 2024-12-22 03:24:55 +00:00
涵曦
f4487945db bump: version 0.3.63 → 0.3.64 2024-12-22 11:23:09 +08:00
涵曦
0bdd2986f1 build: update static version 2024-12-22 11:23:08 +08:00
涵曦
a72777317e fix: 使用自己架设的 sentry 服务,解决 Cloudflare 额度超量问题 2024-12-22 11:22:42 +08:00
Issues Docs [BOT]
f2e096da38 Auto-Generate docs 🤖 2024-12-22 02:26:41 +00:00
涵曦
f42398ec9f Update static.yml 2024-12-22 10:25:12 +08:00
涵曦
5121d141b4 bump: version 0.3.62 → 0.3.63 2024-12-22 10:11:27 +08:00
涵曦
7cf9751dde build: update static version 2024-12-22 10:11:25 +08:00
Issues Docs [BOT]
990defefc9 Auto-Generate docs 🤖 2024-12-22 02:07:10 +00:00
涵曦
4e6afa0e3e Update static.yml 2024-12-22 10:05:28 +08:00
涵曦
e501097ec2 perf: 只监控报错信息 2024-12-22 00:42:46 +08:00
涵曦
ea567fd55a bump: version 0.3.61 → 0.3.62 2024-12-21 23:50:57 +08:00
涵曦
9cb1931f90 build: update static version 2024-12-21 23:50:56 +08:00
涵曦
e50db9ea59 fix: 修复首次配置时,默认主题只有一个设备的问题。 2024-12-21 23:17:09 +08:00
涵曦
5c788ccaed fix: 修复一些报错问题 2024-12-21 19:32:52 +08:00
Issues Docs [BOT]
10a63e5568 Auto-Generate docs 🤖 2024-12-20 11:16:37 +00:00
Issues Docs [BOT]
2460cd3207 Auto-Generate docs 🤖 2024-12-19 13:10:27 +00:00
涵曦
2595451280 bump: version 0.3.60 → 0.3.61 2024-12-19 21:08:49 +08:00
涵曦
2c4b131c19 build: update static version 2024-12-19 21:08:48 +08:00
涵曦
fb84f36b55 refactor: 重构更新流程 2024-12-19 19:12:59 +08:00
涵曦
811e9377f7 fix: 尝试修复更新问题 2024-12-19 18:37:15 +08:00
涵曦
00733ad669 ci: 调试 2024-12-19 16:47:04 +08:00
Issues Docs [BOT]
4cdfd68c4d Auto-Generate docs 🤖 2024-12-19 08:42:06 +00:00
涵曦
2b28bf8551 ci: 打包修改 2024-12-19 16:38:25 +08:00
涵曦
1023caf80a bump: version 0.3.59 → 0.3.60 2024-12-19 13:33:03 +08:00
涵曦
fba021d8fb build: update static version 2024-12-19 13:33:02 +08:00
涵曦
8bac3ee961 Update ci.yml 2024-12-19 13:22:23 +08:00
Issues Docs [BOT]
2f18e1935e Auto-Generate docs 🤖 2024-12-19 05:16:30 +00:00
涵曦
6c208eb1ce Update static.yml 2024-12-19 13:14:44 +08:00
35 changed files with 612 additions and 139 deletions

View File

@@ -23,7 +23,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
@@ -189,8 +191,29 @@ jobs:
sudo apt install -y gh
# 创建或更新 Release
- name: Create or update Release
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
- name: Create or update Release main
if: github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 设置 GH_TOKEN 环境变量
run: |
RELEASE_NAME=test
RELEASE_BODY="This release is automatically updated from the main branch."
# 检查是否已有同名 Release
EXISTING_RELEASE=$(gh release view "${RELEASE_NAME}" --json id --jq .id || echo "")
if [[ -n "${EXISTING_RELEASE}" ]]; then
echo "release exist"
else
# 创建新的 Release
gh release create "${RELEASE_NAME}" \
--prerelease=false \
--title "${RELEASE_NAME}" \
--notes "${RELEASE_BODY}"
fi
- name: Create or update Release tag
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 设置 GH_TOKEN 环境变量
run: |
@@ -210,9 +233,23 @@ jobs:
--notes "${RELEASE_BODY}"
fi
# 上传多个文件并覆盖
- name: Upload assets to Release
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
- name: Upload assets to Release main
if: github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 设置 GH_TOKEN 环境变量
run: |
RELEASE_NAME=test
FILES=$(find . -type f -name "app-*.tar.gz")
for FILE in ${FILES}; do
echo "type upload ${FILE}"
gh release upload "${RELEASE_NAME}" "${FILE}" --clobber
done
- name: Upload assets to Release tag
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 设置 GH_TOKEN 环境变量
run: |
@@ -223,4 +260,3 @@ jobs:
echo "type upload ${FILE}"
gh release upload "${RELEASE_NAME}" "${FILE}" --clobber
done

View File

@@ -8,7 +8,7 @@ on:
paths:
- 'docs/**'
- 'README.md'
- 'CHANGELOG..md'
- 'CHANGELOG.md'
- '.github/workflows/static.yml'
# Runs on issue events
issues:
@@ -43,6 +43,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v2
@@ -84,6 +86,7 @@ jobs:
run: |
if [ "${{ steps.check_changes.outputs.changed }}" == "true" ]; then
git config --local user.name "Issues Docs [BOT]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Auto-Generate docs 🤖"
git push

View File

@@ -1,3 +1,50 @@
## v0.3.66 (2024-12-26)
### Fix
- 修复歌曲批量重命名的问题
- 修复自定义歌单删除后没刷新歌单列表
- 尝试修复更新失败问题
## v0.3.65 (2024-12-24)
### Fix
- 处理图像报错
- 修改歌单名字漏更新歌单列表
- 修复获取自定义歌单接口报错
## v0.3.64 (2024-12-22)
### Fix
- 使用自己架设的 sentry 服务,解决 Cloudflare 额度超量问题
## v0.3.63 (2024-12-22)
### Perf
- 只监控报错信息
## v0.3.62 (2024-12-21)
### Fix
- 修复首次配置时,默认主题只有一个设备的问题。
- 修复一些报错问题
## v0.3.61 (2024-12-19)
### Fix
- 尝试修复更新问题
### Refactor
- 重构更新流程
## v0.3.60 (2024-12-19)
## v0.3.59 (2024-12-19)
### Feat

View File

@@ -46,23 +46,23 @@ export default async ({ mode }) => {
},
},
logLevel: 'warn',
vite:{
vite: {
plugins: [
AutoSidebar({
path:'.',
path: '.',
collapsed: true,
titleFromFile: true,
}),
GitHubIssuesPlugin({
repo: 'hanxi/xiaomusic',
token: env.VITE_GITHUB_ISSUES_TOKEN,
replaceRules:[
replaceRules: [
{
baseUrl: 'https://github.com/hanxi/xiaomusic/issues',
targetUrl: '/issues',
},
],
githubProxy: 'https://github.hanxi.cc/proxy',
githubProxy: 'https://gproxy.hanxi.cc/proxy',
}),
],
}

View File

@@ -30,7 +30,7 @@ docker pull dockerhub.anzu.vip/xiaomusic:latest
## 5. 安装完成后就进入群晖 DOCKER 配置 xiaomusic
<img width="491" alt="image" src="https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/38914725/e318062b-bd70-464c-a8df-8ce3635f2d84">
<img width="491" alt="image" src="https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/38914725/e318062b-bd70-464c-a8df-8ce3635f2d84">
- MI_HARDWARE=型号 前面第4 步骤获取的
- XIAOMUSIC_SEARCH=搜索方式我填写的bilisearch: 意思是通过 bilibili 搜索
@@ -41,11 +41,11 @@ docker pull dockerhub.anzu.vip/xiaomusic:latest
## 6. 配置端口
<img width="757" alt="image (1)" src="https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/38914725/2b6b9283-296f-4845-a3ff-0ebb11f548b4">
<img width="757" alt="image (1)" src="https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/38914725/2b6b9283-296f-4845-a3ff-0ebb11f548b4">
## 7. 映射路径
<img width="737" alt="image (2)" src="https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/38914725/593718dd-8302-4a69-bec9-36e70f3f0407">
<img width="737" alt="image (2)" src="https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/38914725/593718dd-8302-4a69-bec9-36e70f3f0407">

View File

@@ -350,7 +350,7 @@ key_word_dict中的“播放歌曲”口令是不能修改的是吧因为以
### 评论 16 - mogeqian
不行,后台设置如图
![QQ截图20241111181411](https://github.hanxi.cc/proxy/user-attachments/assets/cc89512f-cab9-488d-b0d6-5b2a3a720ac2)
![QQ截图20241111181411](https://gproxy.hanxi.cc/proxy/user-attachments/assets/cc89512f-cab9-488d-b0d6-5b2a3a720ac2)
日志如下:
```
[2024-11-11 18:08:04] [0.3.46] [INFO] xiaomusic.py:1130: update_config_from_setting ok. data:Config(account='**', password='**', mi_did='726577518,570867755', miio_tts_command='', cookie='', verbose=False, music_path='music', download_path='music/download', conf_path='conf', cache_dir='cache', hostname='192.168.22.4', port=8090, public_port=0, proxy='', search_prefix='bilisearch:', ffmpeg_location='./ffmpeg/bin', active_cmd='play,set_random_play,playlocal,play_music_list,stop', exclude_dirs='@eaDir', music_path_depth=10, disable_httpauth=True, httpauth_username='******', httpauth_password='******', music_list_url='', music_list_json='', custom_play_list_json='', disable_download=False, key_word_dict={'播放歌曲': 'play', '播放本地歌曲': 'playlocal', '关机': 'stop', '下一首': 'play_next', '上一首': 'play_prev', '单曲循环': 'set_play_type_one', '全部循环': 'set_play_type_all', '随机播放': 'set_random_play', '分钟后关机': 'stop_after_minute', '播放列表': 'play_music_list', '刷新列表': 'gen_music_list', '加入收藏': 'add_to_favorites', '收藏歌曲': 'add_to_favorites', '取消收藏': 'del_from_favorites', '播放列表第': 'play_music_list_index', '本地播放歌曲': 'playlocal', '查找歌曲': 'play', '下载歌曲': 'play', '暂停': 'stop', '停止': 'stop', '停止播放': 'stop', '播放歌单': 'play_music_list', '测试自定义口令': 'exec#code1("hello")', '测试链接': 'exec#httpget("https://github.com/hanxi/xiaomusic")'}, key_match_order=['分钟后关机', '播放歌曲', '下一首', '上一首', '单曲循环', '全部循环', '随机播放', '关机', '刷新列表', '播放列表第', '播放列表', '加入收藏', '收藏歌曲', '取消收藏', '播放本地歌曲', '本地播放歌曲', '查找歌曲', '下载歌曲', '暂停', '停止', '停止播放', '播放歌单', '测试自定义口令', '测试链接'], use_music_api=False, use_music_audio_id='1582971365183456177', use_music_id='355454500', log_file='/tmp/xiaomusic.txt', fuzzy_match_cutoff=0.6, enable_fuzzy_match=True, stop_tts_msg='收到,再见', enable_config_example=False, keywords_playlocal='播放本地歌曲,本地播放歌曲', keywords_play='查找歌曲,下载歌曲', keywords_stop='关机,暂停,停止,停止播放', keywords_playlist='播放列表,播放歌单', user_key_word_dict={'测试自定义口令': 'exec#code1("hello")', '测试链接': 'exec#httpget("https://github.com/hanxi/xiaomusic")'}, enable_force_stop=False, devices={'726577518': Device(did='726577518', device_id='******', hardware='LX06', name='小爱音箱Pro', play_type='', cur_music='', cur_playlist='全部'), '570867755': Device(did='570867755', device_id='*********', hardware='L15A', name='小米AI音箱(第二代)', play_type='', cur_music='', cur_playlist='全部')}, group_list='', remove_id3tag=False, convert_to_mp3=False, delay_sec=3, continue_play=False, pull_ask_sec=1, crontab_json='', enable_yt_dlp_cookies=False, get_ask_by_mina=False)

View File

@@ -16,14 +16,14 @@ title: yt-dlp cookies 文件上传功能
1. 下载插件 [Get cookies.txt LOCALLY](https://chromewebstore.google.com/detail/cclelndahbckbenkjhflpdbgdldlbecc)
2. 给予插件访问权限和无痕模式允许使用
![image](https://github.hanxi.cc/proxy/user-attachments/assets/89f6ce94-bb51-4805-8c16-a867ba41e5d2)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/89f6ce94-bb51-4805-8c16-a867ba41e5d2)
3. 打开无痕窗口
4. 打开 youtube.com
5. 登陆 youtube.com
6. 打开新标签页
7. 关闭 youtube.com 的标签页
8. 保存 cookies.txt
![image](https://github.hanxi.cc/proxy/user-attachments/assets/64242595-7b5c-4159-a8bc-4fc922d5de9e)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/64242595-7b5c-4159-a8bc-4fc922d5de9e)
原因见 https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies
@@ -31,10 +31,10 @@ title: yt-dlp cookies 文件上传功能
1. 打开设置页面
2. 设置启用yt-dlp-cookies 选项为 true
![Screenshot_2024-09-29-22-31-40-134_com android chrome-edit](https://github.hanxi.cc/proxy/user-attachments/assets/49760905-475b-493c-9ff4-271c5e797b2f)
![Screenshot_2024-09-29-22-31-40-134_com android chrome-edit](https://gproxy.hanxi.cc/proxy/user-attachments/assets/49760905-475b-493c-9ff4-271c5e797b2f)
3. 点击保存
4. 再点击选择文件,选择前面保存好的 cookies.txt 文件,点击上传。
![Screenshot_2024-09-29-22-33-21-361_com android chrome-edit](https://github.hanxi.cc/proxy/user-attachments/assets/838bfd1c-f19f-4690-86b0-8208d596fbf1)
![Screenshot_2024-09-29-22-33-21-361_com android chrome-edit](https://gproxy.hanxi.cc/proxy/user-attachments/assets/838bfd1c-f19f-4690-86b0-8208d596fbf1)
## 后续用途
@@ -50,7 +50,7 @@ title: yt-dlp cookies 文件上传功能
### 评论 1 - kingfly2016
0.3.37的版本并没有发现可以开启yt-dlp-cookies 并上传cookies文件的地方,尝试把导出的cookies.txt手工上传到conf目录下,没有生效.
![屏幕截图_11-10-2024_183725_192 168 6 202](https://github.hanxi.cc/proxy/user-attachments/assets/9b8b9750-b616-4fd3-8a3c-216b2f99d02c)
![屏幕截图_11-10-2024_183725_192 168 6 202](https://gproxy.hanxi.cc/proxy/user-attachments/assets/9b8b9750-b616-4fd3-8a3c-216b2f99d02c)
---

View File

@@ -91,5 +91,21 @@ mi.com官网重新登陆。
目前反馈的都是飞牛的用户,可能是飞牛有问题。
---
### 评论 7 - 3794313569
在同一个容器内前后分别启动了mi-gpt和xiaomusic两个应用现在通过日志发现mi-gpt的日志一直在记录语音需求基本都在mi-gpt这个应用响应了请问下按照您现在设计的框架内有没有办法可以实现这两个应用同时生效或者稍后类似应用会有专用的通讯协议保证多项应用在同一台机器上的响应。
类似:语音命令-“播放本地歌曲”触发xiaomusic“召唤”mi-gpt配置的唤醒词触发mi-gpt等等。。。。。。
暂时的办法就是买两个小爱音箱不同的命名然后一个应用配置一个did。
---
### 评论 8 - hanxi
> 在同一个容器内前后分别启动了mi-gpt和xiaomusic两个应用现在通过日志发现mi-gpt的日志一直在记录语音需求基本都在mi-gpt这个应用响应了请问下按照您现在设计的框架内有没有办法可以实现这两个应用同时生效或者稍后类似应用会有专用的通讯协议保证多项应用在同一台机器上的响应。 类似:语音命令-“播放本地歌曲”触发xiaomusic“召唤”mi-gpt配置的唤醒词触发mi-gpt等等。。。。。。 暂时的办法就是买两个小爱音箱不同的命名然后一个应用配置一个did。
可以分别部署到两个不同的容器里,两个应用的唤醒词是不同的,不会互相干扰。
---
[链接到 GitHub Issue](https://github.com/hanxi/xiaomusic/issues/211)

View File

@@ -10,7 +10,7 @@ title: 如何批量下载歌曲
> 默认主题 => 设置 => 歌曲下载工具
![Screenshot_2024-09-29-22-36-12-178_com android chrome-edit](https://github.hanxi.cc/proxy/user-attachments/assets/ddd2af00-cd9e-4938-9450-56503453807c)
![Screenshot_2024-09-29-22-36-12-178_com android chrome-edit](https://gproxy.hanxi.cc/proxy/user-attachments/assets/ddd2af00-cd9e-4938-9450-56503453807c)
已经测试过 B 站和 youtube 两种播放列表,播放列表的链接是有要求,不能有其他多余参数。
@@ -38,7 +38,7 @@ https://m.youtube.com/playlist?list=PLUD2d-pqyvT6_ztf31hx-5SsUUvY5UsQn
默认主题 => 设置 =>没有显示找到 歌曲下载工具,
有一个 歌单地址 歌单内容: 输入B站测试地址显示返回无效
![aaa](https://github.hanxi.cc/proxy/user-attachments/assets/31e224cb-fcbd-4841-b545-bfbd2496061b)
![aaa](https://gproxy.hanxi.cc/proxy/user-attachments/assets/31e224cb-fcbd-4841-b545-bfbd2496061b)
---

View File

@@ -223,7 +223,7 @@ def getmy_playlist(type="netease",api_host="http://127.0.0.1/api", playlist_id=N
> 等有空我写个修改歌单内容的插件示例吧。
不用拉,插件我已经写出来了
![image](https://github.hanxi.cc/proxy/user-attachments/assets/53e593e7-1439-4968-9549-8c84b2fee42c)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/53e593e7-1439-4968-9549-8c84b2fee42c)
@@ -250,7 +250,7 @@ def getmy_playlist(type="netease",api_host="http://127.0.0.1/api", playlist_id=N
### 评论 13 - dissipator
# 成功了
![image](https://github.hanxi.cc/proxy/user-attachments/assets/33e22665-b1cc-4069-9e8c-46e466679b30)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/33e22665-b1cc-4069-9e8c-46e466679b30)
# 最好是在setting.json里去配置我测试老是不匹配在setting.json里去配置终于成功。可以直接调用 [NeteaseCloudMusicApi](http://localhost:3000/docs/#/?id=neteasecloudmusicapi) 接口甚至使用UnblockNeteaseMusic 解锁灰色,但是代码需要小调整。
setting.json
@@ -490,8 +490,8 @@ async def getmy_playlist(type="netease",api_host="http://127.0.0.1/api", playlis
### 评论 14 - dissipator
![image](https://github.hanxi.cc/proxy/user-attachments/assets/7412eec4-f7d3-4a86-b186-0118d6f331ff)
![image](https://github.hanxi.cc/proxy/user-attachments/assets/2215e520-0d40-4c2c-8d46-d3106d65fc51)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/7412eec4-f7d3-4a86-b186-0118d6f331ff)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/2215e520-0d40-4c2c-8d46-d3106d65fc51)
---
@@ -500,7 +500,7 @@ async def getmy_playlist(type="netease",api_host="http://127.0.0.1/api", playlis
NeteaseCloudMusicApi似乎获取不到播放地址其他信息倒是有。
![2024-11-28_151952](https://github.hanxi.cc/proxy/user-attachments/assets/c7e7a748-aa82-47f0-8784-f6469cc3e99b)
![2024-11-28_151952](https://gproxy.hanxi.cc/proxy/user-attachments/assets/c7e7a748-aa82-47f0-8784-f6469cc3e99b)
---

View File

@@ -10,7 +10,7 @@ M01:在0.3.55版本【型号兼容模式】与【特殊型号获取对话记录
型号:S12A、LX04、S12 在米家APP可以联动比如客厅有人自定义指令:播放歌曲、关机...等
而M01无论【型号兼容模式】与【特殊型号获取对话记录】设为false或true都无法执行任何自定义指令…
![IMG_6460](https://github.hanxi.cc/proxy/user-attachments/assets/0913e3fa-1f1a-47b0-b8b9-d308bd7793df)
![IMG_6460](https://gproxy.hanxi.cc/proxy/user-attachments/assets/0913e3fa-1f1a-47b0-b8b9-d308bd7793df)
## 评论

View File

@@ -16,10 +16,10 @@ title: xiaomusic极空间安装教程2024/12/4更新
1.**搜索框** 中输入 `hanxi/xiaomusic`,在搜索的结果中直接选择第一个,点击**下载**
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/ef18b479-aef3-4e76-a299-6f220fc9e549)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/ef18b479-aef3-4e76-a299-6f220fc9e549)
2. 在新弹出的版本选择窗口中,根据你的情况选择。
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/20dd0b64-9223-47ae-a3e4-0b0af05796f8)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/20dd0b64-9223-47ae-a3e4-0b0af05796f8)
### 版本说明
- 获取 **最新版** 直接点击 **下载** 即可,建议使用默认的 `latest`
@@ -28,7 +28,7 @@ title: xiaomusic极空间安装教程2024/12/4更新
3. 接着弹出如图所示的页面,耐心等待下载完成。
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/5ea2621a-bba5-4269-b896-0e6ca323beb8)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/5ea2621a-bba5-4269-b896-0e6ca323beb8)
4. 下载完成后切换到 **本地镜像** 选项卡
@@ -37,16 +37,16 @@ title: xiaomusic极空间安装教程2024/12/4更新
## 国内环境:
1. 打开docker在左侧的菜单中选择 **镜像** 切换到 **仓库** 选项卡,点击 **自定义拉取** 按钮
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/bf4ac64e-ce50-4456-bc7b-05530b5abc1b)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/bf4ac64e-ce50-4456-bc7b-05530b5abc1b)
2. 在弹出的对话框中输入 ` m.daocloud.io/docker.io/hanxi/xiaomusic ` ,点击 **拉取** 按钮
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/a8f91db7-eac9-472d-a920-a77c280bbc5e)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/a8f91db7-eac9-472d-a920-a77c280bbc5e)
3. 下载完成后切换到 **本地镜像** 选项卡
# 部署镜像
1. 找到刚才已经拉取好的镜像,*单击选中*,点击 **添加到容器**
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/6e0bcf60-d1aa-46ac-9053-5ad957f3d509)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/6e0bcf60-d1aa-46ac-9053-5ad957f3d509)
2. 在弹出的 **创建容器** 菜单中,切换到 **文件夹路径** 选项卡中,按图中的提示进行配置。
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/cca8bc1c-de8f-4d03-81eb-a0f2b06c121e)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/cca8bc1c-de8f-4d03-81eb-a0f2b06c121e)
**注意:**
* 装载路径中的 **配置文件目录** 和 **音乐目录** 必须进行配置。
@@ -60,7 +60,7 @@ title: xiaomusic极空间安装教程2024/12/4更新
3. 切换到 **端口** 选项卡,修改成与你的极空间 *不冲突* 的本地端口号,如 `5678` 示例按照本地端口号5678来进行配置下同
> 友情提醒: 尽量不要修改容器端口号,否则要到配置文件目录修改对应的`setting.json`文件中的配置,会增加很多麻烦
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/182b32ef-d91f-47c5-ba9d-7ef3542ebf40)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/182b32ef-d91f-47c5-ba9d-7ef3542ebf40)
5. 切换到 **环境** 选项卡,将`XIAOMUSIC_HOSTNAME` 修改为你的 **极空间的IP地址**
> 友情提醒:
@@ -68,26 +68,26 @@ title: xiaomusic极空间安装教程2024/12/4更新
> 2. 不要尝试修改XIAOMUSIC_PORT除非你没有看上一条的友情提醒
> 3. 不要在此处配置`ACCOUNT`和`PASSWORD`,没有过风控仍然无法使用!上古时代的教程不要再看了,容易走火入魔!
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/b41b7359-f2b9-4ad8-b2a2-0ce2a1601739)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/b41b7359-f2b9-4ad8-b2a2-0ce2a1601739)
6. 点击 **应用**按钮,此时容器已经配置完成了,切换到左侧的 **容器概况** 菜单,可查看容器详情
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/5c5b3497-49d8-4f17-9acb-6d1e551caf4f)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/5c5b3497-49d8-4f17-9acb-6d1e551caf4f)
# 进入xiaomusic网页端进行配置
1.请关闭代理,打开浏览器,地址栏输入 **极空间IP:本地端口号**`192.168.2.5:5678`,打开网页后点击 **默认主题**
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/1b286d0f-f10e-46ff-89a0-cdff9e192f9b)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/1b286d0f-f10e-46ff-89a0-cdff9e192f9b)
**注意:**
* 不要复制此处的地址必须输入极空间的IP地址。不知道的建议上咸鱼50块换个不锈钢盆
* 不要输入容器的端口号8090极空间不能使用这个端口号。
2. 点击 **设置** 按钮进入设置页面
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/f3aca07a-3663-4bb6-bb93-0329b2d4c433)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/f3aca07a-3663-4bb6-bb93-0329b2d4c433)
3. 输入**小米账号**、**小米密码**、**XIAOMUSIC_HOSTNAME(IP或域名):**、**外网访问端口**,滑到页面最下方点击 **保存**
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/db03af0c-851a-4185-a7fd-b5b02b6d8d2b)
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/dd42a653-d364-4eec-9f87-efb3c52e57a7)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/db03af0c-851a-4185-a7fd-b5b02b6d8d2b)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/dd42a653-d364-4eec-9f87-efb3c52e57a7)
**注意:**
* 小米账号非手机号,请在手机设置-个人中心中查看小米ID
@@ -95,10 +95,10 @@ title: xiaomusic极空间安装教程2024/12/4更新
* XIAOMUSIC_HOSTNAME(IP或域名): 可以输入当前页面的IP地址在地址栏**不要在此处输入端口号!!!**如果域名需要使用https协议请加上https://
4.如果以上步骤没错,你将在设置中心看见设备列表
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/04074894-6599-4b35-95ea-0618ed906d15)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/04074894-6599-4b35-95ea-0618ed906d15)
5. 回到首页,出现设备列表,切换对应设备即可畅享
![图片](https://github.hanxi.cc/proxy/user-attachments/assets/1ce4791f-7ae7-40b4-8c90-eca6b0799e19)
![图片](https://gproxy.hanxi.cc/proxy/user-attachments/assets/1ce4791f-7ae7-40b4-8c90-eca6b0799e19)
## 评论
@@ -108,7 +108,7 @@ title: xiaomusic极空间安装教程2024/12/4更新
[xiaomusic.txt](https://github.com/user-attachments/files/18011572/xiaomusic.txt)
<img width="559" alt="截屏2024-12-05 00 43 24" src="https://github.hanxi.cc/proxy/user-attachments/assets/160aeacc-e1c0-40fa-b219-6b6f5183c43c">
<img width="559" alt="截屏2024-12-05 00 43 24" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/160aeacc-e1c0-40fa-b219-6b6f5183c43c">
an'zh
无法使用语音播放歌曲小爱s12a。极空间z4pro。
1. 按照教程点击播放本地歌曲提示hostname和设置的端口映射不匹配。映射5678容器端口8090.
@@ -128,10 +128,10 @@ an'zh
### 评论 3 - xiaohuobanhahaha
我没讲清楚。我试了两种极空间的桥接和host模式。桥接模式。我按照教程走的。报错如图
<img width="847" alt="截屏2024-12-05 01 46 52" src="https://github.hanxi.cc/proxy/user-attachments/assets/e7f58907-a216-41e8-bafa-5d49db8eca45">
<img width="516" alt="截屏2024-12-05 01 49 11" src="https://github.hanxi.cc/proxy/user-attachments/assets/4261c2e2-fe0c-4ff6-ae06-ead7f928af57">
<img width="647" alt="截屏2024-12-05 01 47 02" src="https://github.hanxi.cc/proxy/user-attachments/assets/35b195d1-9512-40bb-b336-847e0bb2e6c9">
<img width="667" alt="截屏2024-12-05 01 47 15" src="https://github.hanxi.cc/proxy/user-attachments/assets/b917a977-38cf-4126-8754-c46abe9360a2">
<img width="847" alt="截屏2024-12-05 01 46 52" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/e7f58907-a216-41e8-bafa-5d49db8eca45">
<img width="516" alt="截屏2024-12-05 01 49 11" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/4261c2e2-fe0c-4ff6-ae06-ead7f928af57">
<img width="647" alt="截屏2024-12-05 01 47 02" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/35b195d1-9512-40bb-b336-847e0bb2e6c9">
<img width="667" alt="截屏2024-12-05 01 47 15" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/b917a977-38cf-4126-8754-c46abe9360a2">
提到的第二个问题和日志是我将网络模式改为host的情况能连上音箱但是没法使用语音控制。
@@ -186,8 +186,8 @@ an'zh
### 评论 9 - xiaohuobanhahaha
<img width="660" alt="截屏2024-12-05 02 23 53" src="https://github.hanxi.cc/proxy/user-attachments/assets/b9d26de9-3dcf-4e65-9460-36603735c887">
<img width="780" alt="截屏2024-12-05 02 24 49" src="https://github.hanxi.cc/proxy/user-attachments/assets/6a204cdb-bb10-4f35-822d-613aeed0fae0">
<img width="660" alt="截屏2024-12-05 02 23 53" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/b9d26de9-3dcf-4e65-9460-36603735c887">
<img width="780" alt="截屏2024-12-05 02 24 49" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/6a204cdb-bb10-4f35-822d-613aeed0fae0">
> > 确实是变了。192.168.31.143是我电脑的ip。 hostname='192.168.31.165'是极空间的。小爱是192.168.31.77。现在我的网络结构是电脑连nas上的istoreos旁路由。nas直连主路由小爱直连主路由。主路由dhcp都绑定了。 大佬,这种情况该怎么解决呢。所有设置都是默认,没修改哈。

View File

@@ -256,7 +256,7 @@ stderr: [08:58:10] [0.3.37] [INFO] xiaomusic.py:1094: 播放 80后音悦台 失
### 评论 5 - 201692929
怎么获取 他正在播放什么?或者是播放进度 ?播放列表?我想给他加进去
![233333](https://github.hanxi.cc/proxy/user-attachments/assets/013cd952-69e9-4754-870f-2d5321865179)
![233333](https://gproxy.hanxi.cc/proxy/user-attachments/assets/013cd952-69e9-4754-870f-2d5321865179)
---
@@ -308,20 +308,20 @@ potplayer里播放完全正常~~
> 发出来看看?
经过实验发现本地生成的m3u用potplayer播放正常
![image](https://github.hanxi.cc/proxy/user-attachments/assets/754e4344-9262-4ad1-bf17-dd83f5e3b6e5)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/754e4344-9262-4ad1-bf17-dd83f5e3b6e5)
转换为json去掉"type":"radio")后用小爱播放也正常
![image](https://github.hanxi.cc/proxy/user-attachments/assets/9f1a9f02-6cf1-4536-91bd-e5e3677d6513)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/9f1a9f02-6cf1-4536-91bd-e5e3677d6513)
但是alist链接就不正常alist生成的m3u格式如下
`#EXTM3U
#EXTINF:-1,Let Me Hear.mp3
http://192.168.1.198:5244/d/%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90%20%E9%9F%B3%E4%B9%90%E4%BA%91%E7%9B%98/Let%20Me%20Hear.mp3?sign=xxxx=:0`
没有时长信息但是用potplayer一播放就出现时长了
![image](https://github.hanxi.cc/proxy/user-attachments/assets/34ac4b9f-8b7f-40d7-9ac9-aa4621b59aa3)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/34ac4b9f-8b7f-40d7-9ac9-aa4621b59aa3)
而用小爱播放就始终没有时长(切歌、等待都试过了)
![image](https://github.hanxi.cc/proxy/user-attachments/assets/a42b62e4-7a48-46b8-b83b-a4c8cb219c0b)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/a42b62e4-7a48-46b8-b83b-a4c8cb219c0b)
大佬你的示例链接gist.github.com/hanxi/dda82d964a28f8110f8fba81c3ff8314里的又是正常的感觉可能是alist的流比较特殊。。
![image](https://github.hanxi.cc/proxy/user-attachments/assets/f84ab805-54a6-40f1-937c-67832ff0b9d6)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/f84ab805-54a6-40f1-937c-67832ff0b9d6)
---

View File

@@ -4,7 +4,7 @@ title: 微信交流群二维码
# 微信交流群二维码
![mmqrcode1734136802660](https://github.hanxi.cc/proxy/user-attachments/assets/a53867c9-f841-4873-b91b-35b877221fe1)
![mmqrcode1734721614705](https://gproxy.hanxi.cc/proxy/user-attachments/assets/4113e68b-17a8-4067-ba89-e809b3ae817b)
## 评论
@@ -24,7 +24,7 @@ title: 微信交流群二维码
### 评论 3 - hanxi
![mm_reward_qrcode_1726365700471](https://github.hanxi.cc/proxy/user-attachments/assets/7863e361-7e61-48a7-bd71-8f8f609f11b4)
![mm_reward_qrcode_1726365700471](https://gproxy.hanxi.cc/proxy/user-attachments/assets/7863e361-7e61-48a7-bd71-8f8f609f11b4)
---

View File

@@ -8,15 +8,15 @@ title: 如何添加m3u格式文件的电台
1. 复制文件内容,粘贴到 m3u 转换工具里,点击转换为 json 格式:
![Screenshot_2024-06-29-11-28-58-904_com android chrome](https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/bb812a47-17c5-4483-9234-4cf33367b181)
![Screenshot_2024-06-29-11-28-58-904_com android chrome](https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/bb812a47-17c5-4483-9234-4cf33367b181)
2. 然后复制 json 内容,粘贴到歌单内容里,点击保存,再返回首页:
![Screenshot_2024-06-29-11-29-22-248_com android chrome](https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/2fb4ca44-6b79-4438-9bc6-cfbd01272f20)
![Screenshot_2024-06-29-11-29-22-248_com android chrome](https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/2fb4ca44-6b79-4438-9bc6-cfbd01272f20)
3. 在首页点击刷新列表,选择所有电台,再点击播放列表歌曲:
![Screenshot_2024-06-29-11-29-55-621_com android chrome](https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/c94e4667-f83e-4cd5-9662-e680316cb5b4)
![Screenshot_2024-06-29-11-29-55-621_com android chrome](https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/c94e4667-f83e-4cd5-9662-e680316cb5b4)
4. 也可以用口令播放电台: `播放列表所有电台` ,或者口令: `播放歌曲北京城市广播`

View File

@@ -14,7 +14,7 @@ pip install xiaomusic
依赖的 ffmpeg 需要自己安装。
![image](https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/6912e3ec-c42f-42de-b027-a296f5a26ba1)
![image](https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/6912e3ec-c42f-42de-b027-a296f5a26ba1)
仓库中有个 config-example.json 文件,可以把这个文件拷贝为 config.json 然后修改 config.json 里的配置,再用下面的命令启动。

View File

@@ -6,9 +6,9 @@ title: ios系统上的捷径配置
下面是播放音乐和关机两个示例。只要在 web 页面上能看到的功能,都有对应的 http 请求接口,都可以用来配置捷径。
![mmexport1719767452647](https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/db0a1856-e1ed-47cb-972d-d997f71bf92b)
![mmexport1719767452647](https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/db0a1856-e1ed-47cb-972d-d997f71bf92b)
![mmexport1719767449742](https://github.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/92b7bc4b-9699-49cc-956a-4bddb6bd50fa)
![mmexport1719767449742](https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/assets/1185757/92b7bc4b-9699-49cc-956a-4bddb6bd50fa)
## 评论

View File

@@ -201,7 +201,7 @@ RUN pip install -U xiaomusic
> ```
我直接用pip安装好之后执行仍然有缺少的依赖和docker里缺的一样。截图的module安装了之后还会有其他依赖缺失
![image](https://github.hanxi.cc/proxy/user-attachments/assets/9fb182e2-ad41-488d-8633-4bae06202f73)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/9fb182e2-ad41-488d-8633-4bae06202f73)
---
@@ -236,7 +236,7 @@ RUN pip install -U xiaomusic
### 评论 9 - sqmcool
为什么我的没有显示设备?
![Snipaste_2024-09-14_15-51-00](https://github.hanxi.cc/proxy/user-attachments/assets/245d9a85-4ee1-4c82-be0d-865a29827072)
![Snipaste_2024-09-14_15-51-00](https://gproxy.hanxi.cc/proxy/user-attachments/assets/245d9a85-4ee1-4c82-be0d-865a29827072)
---
@@ -252,7 +252,7 @@ RUN pip install -U xiaomusic
### 评论 11 - schppd
楼主您好,请问这个我需要怎么处理?
![微信截图_20240915225040](https://github.hanxi.cc/proxy/user-attachments/assets/d4ecb7fb-6a47-4c66-bbab-72babf4afb9c)
![微信截图_20240915225040](https://gproxy.hanxi.cc/proxy/user-attachments/assets/d4ecb7fb-6a47-4c66-bbab-72babf4afb9c)
---
@@ -316,7 +316,7 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
### 评论 16 - agigogo
![image](https://github.hanxi.cc/proxy/user-attachments/assets/4fed0748-5497-47b5-ac9c-9cbc1d826a94)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/4fed0748-5497-47b5-ac9c-9cbc1d826a94)
在docker里可以运行但是没法播放设置页面中的播放链接选中设备那里是空的是不是没成功怎么调整
@@ -342,7 +342,7 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
>
> 设置页面输入小米的账号密码后,再勾选一个设备。
![image](https://github.hanxi.cc/proxy/user-attachments/assets/a4185b88-89b2-4682-b931-47fa39463c0c)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/a4185b88-89b2-4682-b931-47fa39463c0c)
设置页面没有可勾选项?
---
@@ -363,7 +363,7 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
>
> ![image](https://private-user-images.githubusercontent.com/73272860/369589185-a4185b88-89b2-4682-b931-47fa39463c0c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjY4ODUzMzgsIm5iZiI6MTcyNjg4NTAzOCwicGF0aCI6Ii83MzI3Mjg2MC8zNjk1ODkxODUtYTQxODViODgtODliMi00NjgyLWI5MzEtNDdmYTM5NDYzYzBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTIxVDAyMTcxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA3NzU1YjcwYWY2ZTNmYTRiZTY4NGU0MDMyZGIxNDBjYjE3ZThhNzdjMmJhYWEzYjE4MjJjMjgyNzk4OWVlODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.0MwpJNlNUU9XhjwOFcLisXQHFTAjsU8lscTm5-sfZpw) 设置页面没有可勾选项?
![image](https://github.hanxi.cc/proxy/user-attachments/assets/6bdf44b1-03cd-436f-a222-4889301affaa)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/6bdf44b1-03cd-436f-a222-4889301affaa)
显示未检测到设备设备型号是MDZ-25-DA
@@ -421,9 +421,9 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
### 评论 27 - zealler9560
![Screenshot_2024-10-31-23-28-57-903_com.android.chrome.jpg](https://github.hanxi.cc/proxy/user-attachments/assets/541ff644-0dcd-4bda-a142-2eb4a0f94b9d)
![Screenshot_2024-10-31-23-28-57-903_com.android.chrome.jpg](https://gproxy.hanxi.cc/proxy/user-attachments/assets/541ff644-0dcd-4bda-a142-2eb4a0f94b9d)
istore系统可以拉取创建镜像但是无法启动错误提示见图一求助大佬路由器信息见图二![Screenshot_2024-10-31-23-36-42-846-edit_com.android.chrome.jpg](https://github.hanxi.cc/proxy/user-attachments/assets/767383a5-8f84-471b-ab15-61e0fe9cbb22)
istore系统可以拉取创建镜像但是无法启动错误提示见图一求助大佬路由器信息见图二![Screenshot_2024-10-31-23-36-42-846-edit_com.android.chrome.jpg](https://gproxy.hanxi.cc/proxy/user-attachments/assets/767383a5-8f84-471b-ab15-61e0fe9cbb22)
@@ -626,8 +626,8 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
### 评论 41 - CallEdison
![image](https://github.hanxi.cc/proxy/user-attachments/assets/6724300b-ce48-44e6-9729-7b844bc0751e)
![image](https://github.hanxi.cc/proxy/user-attachments/assets/e7e87adb-a54d-42dd-bfc9-f84a01116a48)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/6724300b-ce48-44e6-9729-7b844bc0751e)
![image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/e7e87adb-a54d-42dd-bfc9-f84a01116a48)
问题一能进控制面板进不了设置页面容器没有log生成我昨天已经设置好了现在功能能正常使用但是进不了设置页面了问题二昨天能进的时候发现本地下载目录有歌曲但是设置里面的全部歌曲里面没有搜索框搜索又能搜的到。
---
@@ -719,7 +719,7 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
### 评论 47 - like1020
![Screenshot_2024-12-03-06-58-52-853_com yjllq kito](https://github.hanxi.cc/proxy/user-attachments/assets/5d37bfa6-d63a-46b1-b5a8-554814fc7dce)
![Screenshot_2024-12-03-06-58-52-853_com yjllq kito](https://gproxy.hanxi.cc/proxy/user-attachments/assets/5d37bfa6-d63a-46b1-b5a8-554814fc7dce)
请教一下,本地列表歌单里的歌曲即便设置为全部循环或随机播放,依然是不断地单曲循环,只能自己手动点下一首,请问是什么情况?
---
@@ -1101,5 +1101,260 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
绿联的NAS怎么更新到58版本啊没找到要用口令吗
---
### 评论 72 - duming215
网页后台可以播放,语音控制一直抽风,可以识别下载歌曲,但是不能执行其他命令。而且歌曲经常放到一半多就切歌了。。。
语音命令都是严格按关键词来说的。大佬帮忙看看
Traceback (most recent call last):
File "/app/xiaomusic/analytics.py", line 104, in post_to_umami
async with session.post(url, json=data, headers=headers) as response:
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 1425, in __aenter__
self._resp: _RetType = await self._coro
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 703, in _request
conn = await self._connector.connect(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 548, in connect
proto = await self._create_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1056, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
raise last_exc
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host umami.hanxi.cc:443 ssl:default [Connection reset by peer]
[2024-12-20 15:39:58] [0.3.61] [INFO] analytics.py:73: analytics run_with_cancel success
[2024-12-20 15:39:58] [0.3.61] [INFO] xiaomusic.py:2012: cancel_next_timer
[2024-12-20 15:39:58] [0.3.61] [INFO] xiaomusic.py:2018: 下一曲定时器不见了
[2024-12-20 15:39:58] [0.3.61] [INFO] xiaomusic.py:1936: 321 秒后将会播放下一首歌曲
[2024-12-20 15:39:58] [0.3.61] [INFO] xiaomusic.py:1307: save_cur_config ok
[15:40:29] [0.3.61] [INFO] 192.168.0.67:8041 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:41:29] [0.3.61] [INFO] 192.168.0.67:8092 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:42:29] [0.3.61] [INFO] 192.168.0.67:8164 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[2024-12-20 15:43:07] [0.3.61] [INFO] xiaomusic.py:797: 收到消息:播放歌曲ARE YOU OK 控制面板:False did:108581258
[2024-12-20 15:43:07] [0.3.61] [INFO] xiaomusic.py:893: 匹配到指令. opkey:播放歌曲 opvalue:play oparg:ARE YOU OK
[2024-12-20 15:43:07] [0.3.61] [INFO] xiaomusic.py:1465: play. search_key:ARE YOU OK name:ARE YOU OK
[2024-12-20 15:43:07] [0.3.61] [INFO] xiaomusic.py:932: 没找到歌曲【ARE YOU OK】
[2024-12-20 15:43:07] [0.3.61] [INFO] xiaomusic.py:1718: download cmd: yt-dlp bilisearch:ARE YOU OK -x --audio-format mp3 --audio-quality 0 --paths music/download -o ARE YOU OK.mp3 --ffmpeg-location ./ffmpeg/bin --no-playlist
[2024-12-20 15:43:07] [0.3.61] [INFO] xiaomusic.py:1627: try do_tts value:正在下载歌曲ARE YOU OK
[2024-12-20 15:43:12] [0.3.61] [INFO] xiaomusic.py:1638: do_tts ok. cur_music:周杰伦的晴天
[2024-12-20 15:43:12] [0.3.61] [INFO] xiaomusic.py:1683: Download Process is still running.
[2024-12-20 15:43:12] [0.3.61] [INFO] xiaomusic.py:1683: Download Process is still running.
[2024-12-20 15:43:12] [0.3.61] [INFO] xiaomusic.py:1739: 不会继续播放歌曲. isplaying:True isdownloading:True
[2024-12-20 15:43:12] [0.3.61] [INFO] xiaomusic.py:1721: 正在下载中 ARE YOU OK ARE YOU OK
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:558: 已从【cache/tag_cache.json】加载 tag cache
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:599: ignore_tag_absolute_dirs: []
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:572: 保存tag cache 已保存到【cache/tag_cache.json】
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:627: tag 更新完成
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1755: add_download_music add_music ARE YOU OK
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:2022: cancel_group_next_timer {'108581258': <xiaomusic.xiaomusic.XiaoMusicDevice object at 0x7f31cc6c3610>}
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:2012: cancel_next_timer
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:2015: 下一曲定时器已取消 9fcc3636-3b8e-4309-a430-7eb8978d94f4
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1589: cur_music ARE YOU OK
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:414: try get_filename. filename:music/download/ARE YOU OK.mp3
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:524: get_music_url local music. name:ARE YOU OK, filename:download/ARE YOU OK.mp3
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:445: get_music_sec_url. name:ARE YOU OK url:http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:414: try get_filename. filename:music/download/ARE YOU OK.mp3
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:459: get_music_sec_url. name:ARE YOU OK filename:music/download/ARE YOU OK.mp3
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:464: 本地歌曲 ARE YOU OK : music/download/ARE YOU OK.mp3 http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3 的时长 133 秒
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1989: group_force_stop_xiaoai ['9fcc3636-3b8e-4309-a430-7eb8978d94f4']
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1644: force_stop_xiaoai player_pause device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1655: {'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0, 'info': '{ "status": 2, "volume": 50, "loop_type": 1, "media_type": 3, "play_song_detail": { "audio_id": "507951590732817", "position": 8680, "duration": 60029 }, "track_list": [ "545606553022895", "176123395447980141", "525480908570653", "507951590732817", "681644918463361", "383285527150302", "1972115018265658007", "658913158921230", "519182249840274", "595248376347937" ] }'}}
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1992: group_force_stop_xiaoai ['9fcc3636-3b8e-4309-a430-7eb8978d94f4'] [None]
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1592: 播放 http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3
[15:43:18] [0.3.61] [INFO] 192.168.0.11:33301 - "GET /music/download/ARE%20YOU%20OK.mp3 HTTP/1.1" 206
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1871: play_one_url play_by_url device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}} url:http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1846: group_player_play http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3 ['9fcc3636-3b8e-4309-a430-7eb8978d94f4'] [{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}]
[2024-12-20 15:43:18] [0.3.61] [INFO] xiaomusic.py:1608: 【ARE YOU OK】已经开始播放了
[15:43:18] [0.3.61] [INFO] 192.168.0.11:33302 - "GET /music/download/ARE%20YOU%20OK.mp3 HTTP/1.1" 206
[15:43:18] [0.3.61] [INFO] 192.168.0.11:33303 - "GET /music/download/ARE%20YOU%20OK.mp3 HTTP/1.1" 206
[2024-12-20 15:43:20] [0.3.61] [ERROR] analytics.py:108: Execption Cannot connect to host umami.hanxi.cc:443 ssl:default [Connection reset by peer]
Traceback (most recent call last):
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1122, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection
transport, protocol = await self._create_connection_transport(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1133, in _create_connection_transport
await waiter
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 862, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/xiaomusic/analytics.py", line 104, in post_to_umami
async with session.post(url, json=data, headers=headers) as response:
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 1425, in __aenter__
self._resp: _RetType = await self._coro
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 703, in _request
conn = await self._connector.connect(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 548, in connect
proto = await self._create_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1056, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
raise last_exc
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host umami.hanxi.cc:443 ssl:default [Connection reset by peer]
[2024-12-20 15:43:20] [0.3.61] [INFO] analytics.py:73: analytics run_with_cancel success
[2024-12-20 15:43:20] [0.3.61] [INFO] xiaomusic.py:2012: cancel_next_timer
[2024-12-20 15:43:20] [0.3.61] [INFO] xiaomusic.py:2018: 下一曲定时器不见了
[2024-12-20 15:43:20] [0.3.61] [INFO] xiaomusic.py:1936: 136 秒后将会播放下一首歌曲
[2024-12-20 15:43:20] [0.3.61] [INFO] xiaomusic.py:1307: save_cur_config ok
[15:43:29] [0.3.61] [INFO] 192.168.0.67:8205 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:797: 收到消息:播放歌曲 控制面板:False did:108581258
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:855: 完全匹配指令. query:播放歌曲 opvalue:play
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:414: try get_filename. filename:music/download/ARE YOU OK.mp3
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:1465: play. search_key: name:ARE YOU OK
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:930: 根据【ARE YOU OK】找到歌曲【['ARE YOU OK']】
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:1440: 没打乱 全部 ['周杰伦的晴天', '周杰伦稻香', '小猪佩奇的故事']
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:2022: cancel_group_next_timer {'108581258': <xiaomusic.xiaomusic.XiaoMusicDevice object at 0x7f31cc6c3610>}
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:2012: cancel_next_timer
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:2015: 下一曲定时器已取消 9fcc3636-3b8e-4309-a430-7eb8978d94f4
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:1589: cur_music ARE YOU OK
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:414: try get_filename. filename:music/download/ARE YOU OK.mp3
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:524: get_music_url local music. name:ARE YOU OK, filename:download/ARE YOU OK.mp3
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:445: get_music_sec_url. name:ARE YOU OK url:http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:414: try get_filename. filename:music/download/ARE YOU OK.mp3
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:459: get_music_sec_url. name:ARE YOU OK filename:music/download/ARE YOU OK.mp3
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:464: 本地歌曲 ARE YOU OK : music/download/ARE YOU OK.mp3 http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3 的时长 133 秒
[2024-12-20 15:43:57] [0.3.61] [INFO] xiaomusic.py:1989: group_force_stop_xiaoai ['9fcc3636-3b8e-4309-a430-7eb8978d94f4']
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1644: force_stop_xiaoai player_pause device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1655: {'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0, 'info': '{ "status": 1, "volume": 50, "loop_type": 1 }'}}
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1668: stop_if_xiaoai_is_playing player_stop device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 enable_force_stop:False ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1992: group_force_stop_xiaoai ['9fcc3636-3b8e-4309-a430-7eb8978d94f4'] [None]
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1592: 播放 http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3
[15:43:58] [0.3.61] [INFO] 192.168.0.11:33306 - "GET /music/download/ARE%20YOU%20OK.mp3 HTTP/1.1" 206
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1871: play_one_url play_by_url device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}} url:http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1846: group_player_play http://192.168.0.3:8090/music/download/ARE%20YOU%20OK.mp3 ['9fcc3636-3b8e-4309-a430-7eb8978d94f4'] [{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}]
[2024-12-20 15:43:58] [0.3.61] [INFO] xiaomusic.py:1608: 【ARE YOU OK】已经开始播放了
[15:43:58] [0.3.61] [INFO] 192.168.0.11:33307 - "GET /music/download/ARE%20YOU%20OK.mp3 HTTP/1.1" 206
[15:43:58] [0.3.61] [INFO] 192.168.0.11:33308 - "GET /music/download/ARE%20YOU%20OK.mp3 HTTP/1.1" 206
[2024-12-20 15:44:00] [0.3.61] [ERROR] analytics.py:108: Execption Cannot connect to host umami.hanxi.cc:443 ssl:default [Connection reset by peer]
Traceback (most recent call last):
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1122, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection
transport, protocol = await self._create_connection_transport(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1133, in _create_connection_transport
await waiter
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 862, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/xiaomusic/analytics.py", line 104, in post_to_umami
async with session.post(url, json=data, headers=headers) as response:
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 1425, in __aenter__
self._resp: _RetType = await self._coro
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 703, in _request
conn = await self._connector.connect(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 548, in connect
proto = await self._create_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1056, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
raise last_exc
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host umami.hanxi.cc:443 ssl:default [Connection reset by peer]
[2024-12-20 15:44:00] [0.3.61] [INFO] analytics.py:73: analytics run_with_cancel success
[2024-12-20 15:44:00] [0.3.61] [INFO] xiaomusic.py:2012: cancel_next_timer
[2024-12-20 15:44:00] [0.3.61] [INFO] xiaomusic.py:2018: 下一曲定时器不见了
[2024-12-20 15:44:00] [0.3.61] [INFO] xiaomusic.py:1936: 136 秒后将会播放下一首歌曲
[2024-12-20 15:44:00] [0.3.61] [INFO] xiaomusic.py:1307: save_cur_config ok
[15:44:29] [0.3.61] [INFO] 192.168.0.67:8252 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:797: 收到消息:播放歌曲周杰伦的搁浅 控制面板:False did:108581258
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:893: 匹配到指令. opkey:播放歌曲 opvalue:play oparg:周杰伦的搁浅
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:1465: play. search_key:周杰伦的搁浅 name:周杰伦的搁浅
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:930: 根据【周杰伦的搁浅】找到歌曲【['周杰伦的晴天']】
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:1440: 没打乱 最近新增 ['周杰伦的晴天', '周杰伦稻香', '小猪佩奇的故事']
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:2022: cancel_group_next_timer {'108581258': <xiaomusic.xiaomusic.XiaoMusicDevice object at 0x7f31cc6c3610>}
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:2012: cancel_next_timer
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:2015: 下一曲定时器已取消 9fcc3636-3b8e-4309-a430-7eb8978d94f4
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:1589: cur_music 周杰伦的晴天
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:414: try get_filename. filename:music/download/周杰伦的晴天.mp3
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:524: get_music_url local music. name:周杰伦的晴天, filename:download/周杰伦的晴天.mp3
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:445: get_music_sec_url. name:周杰伦的晴天 url:http://192.168.0.3:8090/music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:414: try get_filename. filename:music/download/周杰伦的晴天.mp3
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:459: get_music_sec_url. name:周杰伦的晴天 filename:music/download/周杰伦的晴天.mp3
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:464: 本地歌曲 周杰伦的晴天 : music/download/周杰伦的晴天.mp3 http://192.168.0.3:8090/music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3 的时长 318 秒
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:1989: group_force_stop_xiaoai ['9fcc3636-3b8e-4309-a430-7eb8978d94f4']
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:1644: force_stop_xiaoai player_pause device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}
[2024-12-20 15:44:36] [0.3.61] [INFO] xiaomusic.py:1655: {'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0, 'info': '{ "status": 1, "volume": 50, "loop_type": 1 }'}}
[2024-12-20 15:44:37] [0.3.61] [INFO] xiaomusic.py:1668: stop_if_xiaoai_is_playing player_stop device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 enable_force_stop:False ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}
[2024-12-20 15:44:37] [0.3.61] [INFO] xiaomusic.py:1992: group_force_stop_xiaoai ['9fcc3636-3b8e-4309-a430-7eb8978d94f4'] [None]
[2024-12-20 15:44:37] [0.3.61] [INFO] xiaomusic.py:1592: 播放 http://192.168.0.3:8090/music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3
[2024-12-20 15:44:37] [0.3.61] [INFO] xiaomusic.py:1871: play_one_url play_by_url device_id:9fcc3636-3b8e-4309-a430-7eb8978d94f4 ret:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}} url:http://192.168.0.3:8090/music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3
[2024-12-20 15:44:37] [0.3.61] [INFO] xiaomusic.py:1846: group_player_play http://192.168.0.3:8090/music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3 ['9fcc3636-3b8e-4309-a430-7eb8978d94f4'] [{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0}}]
[2024-12-20 15:44:37] [0.3.61] [INFO] xiaomusic.py:1608: 【周杰伦的晴天】已经开始播放了
[15:44:37] [0.3.61] [INFO] 192.168.0.11:33311 - "GET /music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3 HTTP/1.1" 206
[15:44:37] [0.3.61] [INFO] 192.168.0.11:33312 - "GET /music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3 HTTP/1.1" 206
[15:44:37] [0.3.61] [INFO] 192.168.0.11:33313 - "GET /music/download/%E5%91%A8%E6%9D%B0%E4%BC%A6%E7%9A%84%E6%99%B4%E5%A4%A9.mp3 HTTP/1.1" 206
[2024-12-20 15:44:38] [0.3.61] [ERROR] analytics.py:108: Execption Cannot connect to host umami.hanxi.cc:443 ssl:default [Connection reset by peer]
Traceback (most recent call last):
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1122, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection
transport, protocol = await self._create_connection_transport(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1133, in _create_connection_transport
await waiter
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 862, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/xiaomusic/analytics.py", line 104, in post_to_umami
async with session.post(url, json=data, headers=headers) as response:
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 1425, in __aenter__
self._resp: _RetType = await self._coro
File "/app/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 703, in _request
conn = await self._connector.connect(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 548, in connect
proto = await self._create_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1056, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
raise last_exc
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/app/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host umami.hanxi.cc:443 ssl:default [Connection reset by peer]
[2024-12-20 15:44:38] [0.3.61] [INFO] analytics.py:73: analytics run_with_cancel success
[2024-12-20 15:44:38] [0.3.61] [INFO] xiaomusic.py:2012: cancel_next_timer
[2024-12-20 15:44:38] [0.3.61] [INFO] xiaomusic.py:2018: 下一曲定时器不见了
[2024-12-20 15:44:38] [0.3.61] [INFO] xiaomusic.py:1936: 321 秒后将会播放下一首歌曲
[2024-12-20 15:44:38] [0.3.61] [INFO] xiaomusic.py:1307: save_cur_config ok
[15:45:29] [0.3.61] [INFO] 192.168.0.67:8295 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:46:29] [0.3.61] [INFO] 192.168.0.67:8386 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:46:58] [0.3.61] [INFO] 192.168.0.67:8473 - "GET /getsetting HTTP/1.1" 200
[15:46:58] [0.3.61] [INFO] 192.168.0.67:8472 - "GET /getversion HTTP/1.1" 200
[15:46:58] [0.3.61] [INFO] 192.168.0.67:8473 - "GET /musiclist HTTP/1.1" 200
[15:46:58] [0.3.61] [INFO] 192.168.0.67:8473 - "GET /curplaylist?did=108581258 HTTP/1.1" 200
[15:46:58] [0.3.61] [INFO] 192.168.0.67:8479 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[2024-12-20 15:46:59] [0.3.61] [INFO] xiaomusic.py:1951: get_volume. playing_info:{'code': 0, 'message': "Msg has been successfully proxy to the device, this service is a simple proxy, if you encounter any problems pls contact ROM's developers directly!!!", 'data': {'code': 0, 'info': '{ "status": 1, "volume": 50, "loop_type": 1 }'}}
[2024-12-20 15:46:59] [0.3.61] [INFO] xiaomusic.py:1958: get_volume. volume:50
[15:46:59] [0.3.61] [INFO] 192.168.0.67:8472 - "GET /getvolume?did=108581258 HTTP/1.1" 200
[15:46:59] [0.3.61] [INFO] 192.168.0.67:8478 - "GET /latestversion HTTP/1.1" 200
[15:47:01] [0.3.61] [INFO] 192.168.0.67:8478 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:47:04] [0.3.61] [INFO] 192.168.0.67:8478 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:47:05] [0.3.61] [INFO] 192.168.0.67:8478 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:47:07] [0.3.61] [INFO] 192.168.0.67:8478 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:47:10] [0.3.61] [INFO] 192.168.0.67:8478 - "GET /playingmusic?did=108581258 HTTP/1.1" 200
[15:47:12] [0.3.61] [INFO] 192.168.0.67:8478 - "GET /getversion HTTP/1.1" 200 #
---
[链接到 GitHub Issue](https://github.com/hanxi/xiaomusic/issues/99)

View File

@@ -1,5 +1,64 @@
# 版本日志
## v0.3.65 (2024-12-24)
### Fix
- 处理图像报错
- 修改歌单名字漏更新歌单列表
- 修复获取自定义歌单接口报错
## v0.3.64 (2024-12-22)
### Fix
- 使用自己架设的 sentry 服务,解决 Cloudflare 额度超量问题
## v0.3.63 (2024-12-22)
### Perf
- 只监控报错信息
## v0.3.62 (2024-12-21)
### Fix
- 修复首次配置时,默认主题只有一个设备的问题。
- 修复一些报错问题
## v0.3.61 (2024-12-19)
### Fix
- 尝试修复更新问题
### Refactor
- 重构更新流程
## v0.3.60 (2024-12-19)
## v0.3.59 (2024-12-19)
### Feat
- 新增更多的歌单编辑相关接口
- 一键更新功能
- 接入 sentry 平台
- 实现更新接口
- 下载完成之后修改文件权限为755 close #316
### Fix
- 解决飞牛平台报错问题
### Refactor
- 优化代码日志级别
- 更新等消息推送到客户端再重启
- 更新接口修改
## v0.3.58 (2024-12-15)
### Fix

22
pdm.lock generated
View File

@@ -5,7 +5,7 @@
groups = ["default", "dev", "lint"]
strategy = ["inherit_metadata"]
lock_version = "4.5.0"
content_hash = "sha256:69e5e664520761c67366902346f147c8f750335eb6fb5843277776c1fe439ff3"
content_hash = "sha256:be03d4a0e0e150847ab753a6b65d34c908944d20c37203ca0e3edba976f0aa80"
[[metadata.targets]]
requires_python = "==3.10.12"
@@ -891,35 +891,35 @@ files = [
[[package]]
name = "sentry-sdk"
version = "2.19.2"
requires_python = ">=3.6"
version = "1.45.1"
summary = "Python client for Sentry (https://sentry.io)"
groups = ["default"]
marker = "python_full_version == \"3.10.12\""
dependencies = [
"certifi",
"urllib3>=1.26.11",
"urllib3>=1.25.7; python_version <= \"3.4\"",
"urllib3>=1.26.11; python_version >= \"3.6\"",
"urllib3>=1.26.9; python_version == \"3.5\"",
]
files = [
{file = "sentry_sdk-2.19.2-py2.py3-none-any.whl", hash = "sha256:ebdc08228b4d131128e568d696c210d846e5b9d70aa0327dec6b1272d9d40b84"},
{file = "sentry_sdk-2.19.2.tar.gz", hash = "sha256:467df6e126ba242d39952375dd816fbee0f217d119bf454a8ce74cf1e7909e8d"},
{file = "sentry_sdk-1.45.1-py2.py3-none-any.whl", hash = "sha256:608887855ccfe39032bfd03936e3a1c4f4fc99b3a4ac49ced54a4220de61c9c1"},
{file = "sentry_sdk-1.45.1.tar.gz", hash = "sha256:a16c997c0f4e3df63c0fc5e4207ccb1ab37900433e0f72fef88315d317829a26"},
]
[[package]]
name = "sentry-sdk"
version = "2.19.2"
version = "1.45.1"
extras = ["fastapi"]
requires_python = ">=3.6"
summary = "Python client for Sentry (https://sentry.io)"
groups = ["default"]
marker = "python_full_version == \"3.10.12\""
dependencies = [
"fastapi>=0.79.0",
"sentry-sdk==2.19.2",
"sentry-sdk==1.45.1",
]
files = [
{file = "sentry_sdk-2.19.2-py2.py3-none-any.whl", hash = "sha256:ebdc08228b4d131128e568d696c210d846e5b9d70aa0327dec6b1272d9d40b84"},
{file = "sentry_sdk-2.19.2.tar.gz", hash = "sha256:467df6e126ba242d39952375dd816fbee0f217d119bf454a8ce74cf1e7909e8d"},
{file = "sentry_sdk-1.45.1-py2.py3-none-any.whl", hash = "sha256:608887855ccfe39032bfd03936e3a1c4f4fc99b3a4ac49ced54a4220de61c9c1"},
{file = "sentry_sdk-1.45.1.tar.gz", hash = "sha256:a16c997c0f4e3df63c0fc5e4207ccb1ab37900433e0f72fef88315d317829a26"},
]
[[package]]

View File

@@ -1,6 +1,6 @@
[project]
name = "xiaomusic"
version = "0.3.59"
version = "0.3.66"
description = "Play Music with xiaomi AI speaker"
authors = [
{name = "涵曦", email = "im.hanxi@gmail.com"},
@@ -20,7 +20,7 @@ dependencies = [
"pillow>=10.4.0",
"python-multipart>=0.0.12",
"requests>=2.32.3",
"sentry-sdk[fastapi]>=2.19.2",
"sentry-sdk[fastapi]==1.45.1",
]
requires-python = ">=3.10,<=3.12"
readme = "README.md"

View File

@@ -17,6 +17,8 @@ command=/app/.venv/bin/python3 /app/xiaomusic.py
directory=/app
autostart=true
autorestart=true
startretries=99999
startsecs=60
stderr_logfile=/app/xiaomusic.log.txt
stdout_logfile=/app/xiaomusic.log.txt

View File

@@ -1,8 +1,29 @@
from xiaomusic.utils import (
remove_common_prefix,
)
import re
def removepre(filename):
match = re.search(r"^(\d+)\s+\d*(.+?)\.(.*$)", filename.strip())
new_filename = filename
if match:
num = match.group(1)
name = match.group(2).replace(".", " ").strip()
suffix = match.group(3)
# print(name)
# print(num)
# print(suffix)
new_filename = f"{num}.{name}.{suffix}"
print(filename, "=>", new_filename)
if __name__ == "__main__":
remove_common_prefix(
"./tmp/【无损音质】2024年9月酷狗热歌榜TOP100合集只选热歌最高的首首王炸分P合集"
)
removepre(" 17 《白色风车》.mp3")
removepre(" 17 《白色风车》.mp3")
removepre(" 17 17 《白色风车》.mp3")
removepre(" 17 17 《白色风车》.mp3")
removepre(" 18 风车.mp3")
removepre(" 18 色风车.mp3")
removepre(" 18 18 你好.mp3")
removepre(" 18 18 我好.mp3")
removepre("09 009. 梁静茹-亲亲.mp3")

View File

@@ -1 +1 @@
__version__ = "0.3.59"
__version__ = "0.3.66"

View File

@@ -7,7 +7,7 @@ import signal
import sentry_sdk
from sentry_sdk.integrations.asyncio import AsyncioIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
from sentry_sdk.integrations.logging import LoggingIntegration, ignore_logger
LOGO = r"""
__ __ _ __ __ _
@@ -20,9 +20,8 @@ LOGO = r"""
sentry_sdk.init(
dsn="https://659690a901a37237df8097a9eb95e60f@github.hanxi.cc/sentry/4508470200434688",
traces_sample_rate=0.1,
profiles_sample_rate=0.05,
# dsn="https://659690a901a37237df8097a9eb95e60f@github.hanxi.cc/sentry/4508470200434688",
dsn="https://ffe4962642d04b29afe62ebd1a065231@glitchtip.hanxi.cc/1",
integrations=[
AsyncioIntegration(),
LoggingIntegration(
@@ -32,6 +31,7 @@ sentry_sdk.init(
],
# debug=True,
)
ignore_logger("miservice")
def main():

View File

@@ -75,7 +75,7 @@ class Device:
device_id: str = ""
hardware: str = ""
name: str = ""
play_type: int = ""
play_type: int = PLAY_TYPE_RND
cur_music: str = ""
cur_playlist: str = ""

View File

@@ -2,7 +2,6 @@ import asyncio
import hashlib
import json
import os
import re
import secrets
import shutil
import tempfile
@@ -580,6 +579,7 @@ async def playlistupdatename(
@app.get("/playlistnames")
async def getplaylistnames(Verifcation=Depends(verification)):
names = xiaomusic.get_play_list_names()
log.info(f"names {names}")
return {
"ret": "OK",
"names": names,
@@ -688,9 +688,6 @@ def access_key_verification(file_path, key, code):
return False
range_pattern = re.compile(r"bytes=(\d+)-(\d*)")
def safe_redirect(url):
url = try_add_access_control_param(config, url)
url = url.replace("\\", "")

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=1734568930">
<link rel="stylesheet" type="text/css" href="./main.css?version=1735173824">
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script src="./jquery-3.7.1.min.js?version=1734568930"></script>
<script src="./jquery-3.7.1.min.js?version=1735173824"></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=1734568930">
<script src="./jquery-3.7.1.min.js?version=1734568930"></script>
<link rel="stylesheet" type="text/css" href="./main.css?version=1735173824">
<script src="./jquery-3.7.1.min.js?version=1735173824"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z09NC1K7ZW"></script>

View File

@@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>小爱音箱操控面板</title>
<link href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet">
<script src="./jquery-3.7.1.min.js?version=1734568930"></script>
<link rel="stylesheet" href="./main.css?version=1734568930">
<script src="./jquery-3.7.1.min.js?version=1735173824"></script>
<link rel="stylesheet" href="./main.css?version=1735173824">
<link rel="icon" href="./favicon.ico">
<!-- Google tag (gtag.js) -->
@@ -202,7 +202,7 @@
</label>
<select id="update-version" class="version-selector">
<option value="main" selected>测试版</option>
<option value="test" selected>test</option>
</select>
<label for="lite">选择类型:</label>
@@ -220,7 +220,7 @@
Powered by XiaoMusic
</div>
<script src="./md.js?version=1734568930">
<script src="./md.js?version=1735173824">
</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=1734568930">
<link rel="stylesheet" type="text/css" href="./main.css?version=1735173824">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z09NC1K7ZW"></script>

View File

@@ -83,6 +83,9 @@ function nextTrack() {
function togglePlayMode(isSend = true) {
const modeBtnIcon = $("#modeBtn .material-icons");
if (playModeIndex == '') {
playModeIndex = 2;
}
modeBtnIcon.text(playModes[playModeIndex].icon);
$("#modeBtn .tooltip").text(playModes[playModeIndex].cmd);
// return;
@@ -660,11 +663,7 @@ $('#version').on('click', function() {
data.forEach((item) => {
const option = document.createElement("option");
option.value = item.version;
if (item.version=="main"){
option.textContent = "测试版";
} else {
option.textContent = item.version;
}
option.textContent = item.version;
versionSelect.appendChild(option);
});
});

View File

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

View File

@@ -17,7 +17,6 @@ import re
import shutil
import string
import subprocess
import tarfile
import tempfile
import urllib.parse
from collections.abc import AsyncIterator
@@ -337,7 +336,7 @@ async def get_local_music_duration(filename, ffmpeg_location="./ffmpeg/bin"):
m = await loop.run_in_executor(None, mutagen.File, filename)
duration = m.info.length
except Exception as e:
log.error(f"Error getting local music {filename} duration: {e}")
log.warning(f"Error getting local music {filename} duration: {e}")
return duration
@@ -644,14 +643,19 @@ def _save_picture(picture_data, save_root, file_path):
try:
_resize_save_image(picture_data, picture_path)
except Exception as e:
log.exception(f"Error _resize_save_image: {e}")
log.warning(f"Error _resize_save_image: {e}")
return picture_path
def _resize_save_image(image_bytes, save_path, max_size=300):
# 将 bytes 转换为 PIL Image 对象
image = Image.open(io.BytesIO(image_bytes))
image = image.convert("RGB")
image = None
try:
image = Image.open(io.BytesIO(image_bytes))
image = image.convert("RGB")
except Exception as e:
log.warning(f"Error _resize_save_image: {e}")
return
# 获取原始尺寸
original_width, original_height = image.size
@@ -674,8 +678,16 @@ def _resize_save_image(image_bytes, save_path, max_size=300):
def extract_audio_metadata(file_path, save_root):
audio = mutagen.File(file_path)
metadata = Metadata()
audio = None
try:
audio = mutagen.File(file_path)
except Exception as e:
log.warning(f"Error extract_audio_metadata file: {file_path} {e}")
if audio is None:
return asdict(metadata)
tags = audio.tags
if tags is None:
return asdict(metadata)
@@ -953,7 +965,7 @@ def remove_common_prefix(directory):
log.info(f'Common prefix identified: "{common_prefix}"')
pattern = re.compile(r"(\d+)[\t  ]*\1")
pattern = re.compile(r"^(\d+)\s+\d*(.+?)\.(.*$)")
for filename in files:
if filename == common_prefix:
continue
@@ -961,9 +973,12 @@ def remove_common_prefix(directory):
if filename.startswith(common_prefix):
# 构造新的文件名
new_filename = filename[len(common_prefix) :]
match = pattern.match(new_filename)
match = pattern.search(new_filename.strip())
if match:
new_filename = match.group(1) + new_filename[match.end() :]
num = match.group(1)
name = match.group(2).replace(".", " ").strip()
suffix = match.group(3)
new_filename = f"{num}.{name}.{suffix}"
# 生成完整的文件路径
old_file_path = os.path.join(directory, filename)
new_file_path = os.path.join(directory, new_filename)
@@ -1048,7 +1063,7 @@ async def update_version(version: str, lite: bool = True):
log.warning(f"update_version failed: {arch}")
return arch
# https://github.com/hanxi/xiaomusic/releases/download/main/app-amd64-lite.tar.gz
url = f"https://github.hanxi.cc/proxy/hanxi/xiaomusic/releases/download/{version}/app-{arch}{lite_tag}.tar.gz"
url = f"https://gproxy.hanxi.cc/proxy/hanxi/xiaomusic/releases/download/{version}/app-{arch}{lite_tag}.tar.gz"
target_directory = "/app"
return await download_and_extract(url, target_directory)
@@ -1091,17 +1106,29 @@ async def download_and_extract(url: str, target_directory: str):
async for chunk in response.content.iter_any():
f.write(chunk)
log.info(f"文件下载完成: {file_name}")
# 解压下载的文件
if file_name.endswith(".tar.gz"):
with tarfile.open(file_name, "r:gz") as tar:
tar.extractall(path=target_directory)
log.info(f"文件解压完成到: {target_directory}")
await extract_tar_gz(file_name, target_directory)
else:
ret = f"下载失败, 包有问题: {file_name}"
log.warning(ret)
else:
ret = f"下载失败, 状态码: {response.status}"
log.warning(ret)
return ret
async def extract_tar_gz(file_name: str, target_directory: str):
# 使用 asyncio.create_subprocess_exec 执行 tar 解压命令
command = ["tar", "-xzvf", file_name, "-C", target_directory]
# 启动子进程执行解压命令
await asyncio.create_subprocess_exec(*command)
# 不等待子进程完成
log.info(f"extract_tar_gz ing {file_name}")
def chmodfile(file_path: str):
try:
os.chmod(file_path, 0o775)

View File

@@ -76,6 +76,7 @@ class XiaoMusic:
self.all_music = {}
self._all_radio = {} # 电台列表
self.music_list = {} # 播放列表 key 为目录名, value 为 play_list
self.default_music_list_names = [] # 非自定义个歌单
self.devices = {} # key 为 did
self.running_task = []
self.all_music_tags = {} # 歌曲额外信息
@@ -253,6 +254,7 @@ class XiaoMusic:
device.device_id = device_id
device.hardware = hardware
device.name = name
device.play_type = PLAY_TYPE_RND
devices[did] = device
self.config.devices = devices
self.log.info(f"选中的设备: {devices}")
@@ -265,7 +267,7 @@ class XiaoMusic:
return cookie_jar
if not os.path.exists(self.mi_token_home):
self.log.error(f"{self.mi_token_home} file not exist")
self.log.warning(f"{self.mi_token_home} file not exist")
return None
with open(self.mi_token_home, encoding="utf-8") as f:
@@ -325,7 +327,7 @@ class XiaoMusic:
# 检查响应状态码
if r.status != 200:
self.log.error(f"Request failed with status {r.status}")
self.log.warning(f"Request failed with status {r.status}")
continue
except asyncio.CancelledError:
@@ -698,6 +700,9 @@ class XiaoMusic:
for _, play_list in self.music_list.items():
play_list.sort(key=custom_sort_key)
# 非自定义个歌单
self.default_music_list_names = list(self.music_list.keys())
# 刷新自定义歌单
self.refresh_custom_play_list()
@@ -716,6 +721,11 @@ class XiaoMusic:
def refresh_custom_play_list(self):
try:
# 删除旧的自定义个歌单
for k in list(self.music_list.keys()):
if k not in self.default_music_list_names:
del self.music_list[k]
# 合并新的自定义个歌单
custom_play_list = self.get_custom_play_list()
for k, v in custom_play_list.items():
self.music_list[k] = list(v)
@@ -1170,12 +1180,13 @@ class XiaoMusic:
play_list = custom_play_list[oldname]
custom_play_list.pop(oldname)
custom_play_list[newname] = play_list
self.save_custom_play_list()
return True
# 获取所有自定义歌单
def get_play_list_names(self):
custom_play_list = self.get_custom_play_list()
return custom_play_list.keys()
return list(custom_play_list.keys())
# 获取歌单中所有歌曲
def play_list_musics(self, name):
@@ -1646,7 +1657,7 @@ class XiaoMusicDevice:
)
await self.stop_if_xiaoai_is_playing(device_id)
except Exception as e:
self.log.exception(f"Execption {e}")
self.log.warning(f"Execption {e}")
async def get_if_xiaoai_is_playing(self):
playing_info = await self.xiaomusic.mina_service.player_get_status(