更新AGENTS.MD by kazukokawagawa · Pull Request #835 · imsyy/SPlayer
added 4 commits
February 7, 2026 12:45- 重构时间解析函数,使用纯数学运算替代字符串操作以提高性能 - 移除全局正则表达式,改为在函数内局部使用避免状态污染 - 在解析过程中直接计算结束时间,消除二次遍历 - 优化歌词对齐算法,使用双指针实现 O(N) 复杂度 - 改进 QRC 格式解析,提前编译正则并优化 XML 内容提取 - 统一默认单词持续时间处理逻辑
- 在 DownloadManager 中添加 removeDownload 方法,支持从队列和 store 中移除任务 - 修复下载页面中播放全部按钮的逻辑,仅对已下载歌曲生效 - 优化下载中页面的封面显示逻辑,统一使用 getCover 方法 - 将 handleRemoveDownload 的参数类型扩展为 number | string 以支持多种 ID 类型
- 使用字符串补齐替代浮点数计算,避免时间解析的精度误差 - 将 alignLyrics 改为纯函数,不再修改输入数组 - 引入 XmlNode 辅助类重构 TTML 生成逻辑,提高可读性 - 优化 QRC 内容提取的正则表达式,增强健壮性
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