Repository navigation
恢复 CloudMusic 查询与下载可靠性,补齐跨平台测试 - #23
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
旧版的请求序列化、过时接口和按位置拼接数据会导致查询失败、单曲歌单异常、歌曲信息串位、评论重复与遗漏;下载还存在跨平台路径错误、切换音质丢失目录以及失败覆盖文件的风险。
本次恢复维护为 0.2.0,保留主要公共函数和对象用法,修复上述问题,新增可配置 cookie/超时/代理的 Client,复用连接并保留服务端会话。歌曲元数据与音频权限分离,音频信息按批次延迟加载;下载使用流式写入和原子替换,错误统一为可处理的异常。更新搜索、歌单和评论接口,补齐响应校验和分页停止条件。
同时迁移到 pyproject.toml、移除未使用的 HTML 抓取和旧线程池依赖,更新文档与迁移说明,并新增三系统测试和发行包安装检查。本轮不发布 PyPI,也未加入封面标签等额外功能。
验证:
兼容性变化:最低 Python 3.10;单元素列表正确返回列表;音频属性延迟访问;错误改为明确异常。未获权限或仅提供试听时不会假装下载成功。历史 PR #14、#17、#21 的路径与目录传递修复方向已在 README 致谢,未直接合并旧实现。