Commit Graph

8 Commits

Author SHA1 Message Date
史悦
4bdb5c539d fix: 改进音乐API代理的图片端点处理,将JSON响应转换为重定向 2026-01-14 16:19:52 +08:00
史悦
a76ef33c4c feat: 添加音乐API代理以解决CORS跨域问题
- index.html: 将API_BASE改为相对路径 /api/music-api
- sync-server/server.js: 新增 /music-api 代理端点转发请求至 music-dl.sayqz.com
- 新增 proxyRequest 函数处理HTTPS代理请求和重定向
2026-01-14 15:17:58 +08:00
史悦
4ea05279bd 修复(服务器):增强文件名清理的健壮性
实施更严格的文件名清理措施,包括Unicode标准化处理(NFC)、控制字符移除以及200字符的长度限制,以防止歌曲下载过程中出现文件系统错误。
2026-01-09 10:13:53 +08:00
史悦
13ef60b7bd 功能改进(同步):新增元数据嵌入并优化匹配逻辑
- 在Docker容器中安装ffmpeg以支持媒体处理
- 为下载文件嵌入标题、艺术家、专辑及封面图等元数据
- 重构文件存在性检测机制,兼容多种命名格式
- 下载过程中采用临时文件确保数据完整性

(注:根据中文技术文档惯例进行了以下优化:
1. 使用"功能改进"替代直译"feat",更符合国内开发文档表述
2. "metadata embedding"译为"元数据嵌入"是行业标准译法
3. "refactor"译为"重构"准确传达代码改造含义
4. 采用四字短语"确保数据完整性"保持技术文档的简洁性
5. 使用中文括号和冒号格式,符合国内技术文档排版规范)
2026-01-07 12:26:30 +08:00
史悦
a244347999 Modified processSong to check for res.statusCode === 302.
If a redirect is encountered, the Location header is extracted and treated as the direct download URL for the music file.
This aligns the code with the API behavior which redirects to the actual file location instead of returning a JSON response.
2026-01-06 16:22:48 +08:00
史悦
9a220dfe78 增加了 HTTP 状态码检查:在调用音乐下载 API 时,如果返回的状态码不是 200(例如 403 Forbidden 或 500 Error),现在会记录错误并跳过,而不是尝试解析响应体。这应该能解决 Unexpected token F (可能是 "Forbidden" 或 "Failed") 导致的崩溃问题。 2026-01-06 15:58:30 +08:00
史悦
1af86ed6a6 同步时会下载音乐 2026-01-06 15:03:06 +08:00
史悦
ca1026d166 feat(sync): add cloud synchronization for favorites
Add a new sync service and frontend integration to allow syncing
favorites across devices using a token.

- Configure `sync-service` in docker-compose.yml on port 7482
- Add sync token input and manual sync button to SideDrawer
- Implement auto-sync logic to persist favorites to the KV store
- Add logic to merge cloud favorites with local data on initialization
2026-01-06 11:20:06 +08:00