1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2026-04-04 11:45:14 +08:00
Commit Graph

1883 Commits

Author SHA1 Message Date
Issues Docs [BOT]
ebfdaad79a Auto-Generate docs 🤖 2026-03-25 02:21:25 +00:00
birdstudy-nj
c41e7bd325 feat: 启用安全访问后,增加cookie (#801)
开启安全访问后,FastAPI自带的用户名密码验证,每次开页面都会提示输入账号。
但公网可访问的,又必须开启。
因此,增加cookie,默认一周验证失效。既保证安全,又不失便利性。
2026-03-24 16:25:37 +08:00
Issues Docs [BOT]
12192b0866 Auto-Generate docs 🤖 2026-03-24 02:49:41 +00:00
boluofan
f128d516b4 feat: lxserver接口功能拓展 (#798)
* 【默认主题】增加[在线搜索]按钮

* 接入LX Server接口

* 增加LX Server相关配置界面及接口

* 1. 优化配置及前端展示
2. 增加高级配置

* 优化歌曲追加逻辑:支持翻页追加

* 1. 优化前端展示效果
2. 增加配置文件对比合并

* 优化配置文件解构

* 移除重复函数

* 更新版本、引用说明文档

* 更新文档
2026-03-23 15:40:05 +08:00
zkwzk.eth
0ba962c06c fix: added the function to parse the url copied from bilibili to the music download tool (#796)
* parse the clipboard pasted text to auto fill the url and name which copied from the bilibili share link feature, for example, the copied url from bilibili like this: `【【推荐歌单】2026年最火的60首热门歌曲合集,值得收藏的流行音乐合集】 https://www.bilibili.com/video/BV1rLAszFEpn/?share_source=copy_web&vd_source=00b5827a742df338af5f9af18320a0b4`, the portion before https will be in the name input, the url will be in the url input

* upgrade library for security update
2026-03-23 14:19:49 +08:00
Issues Docs [BOT]
0fa61b70d3 Auto-Generate docs 🤖 2026-03-22 14:05:24 +00:00
Issues Docs [BOT]
f021ba553a Auto-Generate docs 🤖 2026-03-21 06:22:16 +00:00
涵曦
d2cf119027 Update README.md 2026-03-21 14:20:32 +08:00
nono11875
e5a56933d8 fix: 移除日志和控制台中敏感凭据的明文输出 (#793)
- 删除 _save_auth_data() 中打印完整 auth_data 的 print(含 passToken/ssecurity/serviceToken)
- 删除 _request() 中打印请求数据和响应数据的 print
- auth.py get_cookie() 日志不再输出 .mi.token 文件完整内容
- auth.json 写入后设置 0600 权限,防止其他用户读取

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:42:08 +08:00
Issues Docs [BOT]
d62d9b7695 Auto-Generate docs 🤖 2026-03-20 04:43:22 +00:00
涵曦
3b3fe9ef8f bump: version 0.4.25 → 0.4.26 v0.4.26 2026-03-20 12:41:26 +08:00
涵曦
8d6e61e803 build: update static version 2026-03-20 12:41:22 +08:00
Formatter [BOT]
f6a86345f1 Auto-format code 🧹🌟🤖 2026-03-20 02:34:46 +00:00
hejun041
311b75cb8e fix: proxy handler CDN safeguard & content-type based FFmpeg routing (#791)
- 用精确域名后缀匹配替代 mcdn/hdslb 子串匹配,避免误伤其他插件
- 电台流(is_radio=True)跳过 bilibili FFmpeg 路径
- _bilibili_ffmpeg_stream 泛化为 _ffmpeg_mp3_stream,支持可选 extra_headers
- 新增 Content-Type 兜底:非 bilibili CDN 返回 video/mp4 或 audio/aac 时同样走 FFmpeg 转码

Co-authored-by: hejun041 <hejun041@gmail.com>
2026-03-20 10:34:19 +08:00
Issues Docs [BOT]
3f0bd174e8 Auto-Generate docs 🤖 2026-03-20 01:01:27 +00:00
Issues Docs [BOT]
ecdd512e03 Auto-Generate docs 🤖 2026-03-19 15:18:59 +00:00
涵曦
b0f3f3c67c update doc 2026-03-19 23:16:25 +08:00
涵曦
f4a50722d9 bump: version 0.4.24 → 0.4.25 v0.4.25 2026-03-19 22:29:59 +08:00
涵曦
322ad7d22e build: update static version 2026-03-19 22:29:13 +08:00
Formatter [BOT]
c2ab2e7e2e Auto-format code 🧹🌟🤖 2026-03-19 07:07:15 +00:00
hejun041
e1e83d02bc fix: proxy url too long for xiaomi speaker (#786)
* fix: use short token proxy URL to avoid firmware URL length limit on Xiaomi speakers

Small Xiaomi speakers (e.g. LX06) have an HTTP client URL length limit
of ~1024 bytes. The previous implementation base64-encoded the full
plugin-url (which itself contains a large base64 JSON payload) and
appended it as a query parameter, resulting in URLs of ~1500+ characters.
This caused the speaker firmware to truncate the request, returning 400
and triggering a playback failure.

Fix:
- In `music_library.py`: `_get_proxy_url` now generates a short
  random token (10 chars) via `secrets.token_urlsafe(8)`, stores the
  original URL in an in-memory cache `_proxy_token_cache`, and returns
  a short URL like `/proxy/music?token=<token>` (~60 chars total).
- In `api/routers/file.py`: `/proxy/{type}` route now accepts an
  optional `token` parameter. When present, it looks up the original
  URL from the cache and proxies it. The `urlb64` mode is kept for
  backward compatibility.
- Tokens are not consumed on first use, allowing both the speaker and
  ffprobe to make multiple requests for the same track.

Tested on LX06 (小爱音箱Pro) with bilibili online music plugin.

* refactor: move _proxy_token_cache to music_library.py to avoid circular import

* fix: bilibili CDN aiohttp proxy + FFmpeg transcode to MP3 for LX06 compatibility

- Detect bilivideo/mcdn/hdslb domains in redirect loop and switch to _bilibili_ffmpeg_stream
- Use aiohttp to download MP4 (with Referer/Origin) and pipe to FFmpeg stdin to avoid CDN 403
- FFmpeg transcodes to MP3 (libmp3lame 128k) for LX06 firmware compatibility
- Fixes: FFmpeg direct CDN access returns 403, LX06 cannot play raw MP4/AAC stream

* refactor: use get/set functions for proxy token cache instead of direct import

---------

Co-authored-by: hejun041 <hejun041@users.noreply.github.com>
2026-03-19 15:06:45 +08:00
birdstudy-nj
1f551d59a3 新增本地搜索,及保存为歌单。UI和歌曲刮削做了调整。 (#787) 2026-03-19 15:03:26 +08:00
涵曦
e53eb730f0 Revert "移除文档生成"
This reverts commit ff54e9df95.
2026-03-17 23:19:39 +08:00
涵曦
d68108ba9a fix: 无法上传音乐 close #783 2026-03-14 20:05:59 +08:00
涵曦
6651341821 bump: version 0.4.23 → 0.4.24 v0.4.24 2026-03-13 23:15:28 +08:00
涵曦
628a4a5146 build: update static version 2026-03-13 23:15:23 +08:00
boluofan
064238744a feat:【默认主题】增加[在线搜索]按钮 (#782) 2026-03-13 09:27:09 +08:00
birdstudy-nj
66b837bc56 新增长按歌曲,添加/删除收藏 (#781) 2026-03-12 20:49:04 +08:00
涵曦
13030fa5ab 修复无法收藏歌曲的问题 2026-03-11 10:05:21 +08:00
涵曦
fedac35a4c 修复无法收藏歌曲的问题 2026-03-11 09:58:37 +08:00
涵曦
c3183f22de fix: 修复无法收藏歌曲的问题 2026-03-10 19:09:41 +08:00
birdstudy-nj
9adc76012b 重写了歌曲刮削,若干UI界面微调,修复推送bug (#779) 2026-03-10 18:43:37 +08:00
birdstudy-nj
f5c898b14d 重写了歌曲刮削,若干UI界面微调 (#778) 2026-03-10 16:49:01 +08:00
涵曦
757a71af79 format code 2026-03-06 22:05:05 +08:00
涵曦
9987425a43 format code 2026-03-06 20:42:05 +08:00
birdstudy-nj
774792318e feat: 新增适配iPhone主题 (#775)
* Create iwebplayer.html

* Add link for iPhone theme adaptation
2026-03-05 19:09:43 +08:00
GanHuaLin
17d5218845 feat: Add 肉肉音乐TV link to index.html (#773)
Added link to 肉肉音乐TV in options list.
2026-03-04 11:16:23 +08:00
boluofan
9741376307 feature: 在线搜索优化 (#774)
* 1. 移除【TuneFree API】接口及配置
2. 修复自动加歌时顺序被打乱和不生效bug
3. 修复online歌单歌曲顺序混乱问题

* 修改前端样式
2026-03-04 11:15:49 +08:00
GanHuaLin
23c9d9ae02 docs: 增加 TV 客户端 rouroumusic-tv 到配套应用列表 (#772)
* docs: 增加配套应用 肉肉音乐TV

* docs: 增加配套应用 肉肉音乐TV
2026-03-04 09:49:19 +08:00
涵曦
ff54e9df95 移除文档生成 2026-03-03 13:51:40 +08:00
Issues Docs [BOT]
6c6a9081fb Auto-Generate docs 🤖 2026-02-25 04:49:26 +00:00
Issues Docs [BOT]
54d5dc0007 Auto-Generate docs 🤖 2026-02-22 14:23:31 +00:00
Issues Docs [BOT]
62866a5a7c Auto-Generate docs 🤖 2026-02-22 12:09:17 +00:00
Issues Docs [BOT]
80c3ef3fcf Auto-Generate docs 🤖 2026-02-20 09:01:54 +00:00
涵曦
7587ee5ba2 Update README.md 2026-02-20 17:00:00 +08:00
Issues Docs [BOT]
351097b020 Auto-Generate docs 🤖 2026-02-19 15:05:45 +00:00
Issues Docs [BOT]
c23e696995 Auto-Generate docs 🤖 2026-02-17 11:22:34 +00:00
涵曦
5507af45ec bump: version 0.4.22 → 0.4.23 v0.4.23 2026-02-17 19:20:30 +08:00
涵曦
d2c4195e29 build: update static version 2026-02-17 19:20:25 +08:00
Issues Docs [BOT]
565fea8de6 Auto-Generate docs 🤖 2026-02-13 15:47:58 +00:00