refactor(playlist): 优化歌单刷新机制与请求逻辑以更好适配 Meting 扩展插件#58
Open
SDCOM-0415 wants to merge 3 commits into
Open
Conversation
添加reqwest依赖,支持通过http/https URL加载音频资源,同时保留本地文件播放能力
扩展了封面路径的处理逻辑,区分本地文件路径和网络URL,不再对网络链接使用convertFileSrc进行转换,同时更新了多处相关的代码逻辑,包括播放列表卡片、本地音乐上下文、播放列表封面组件以及歌曲封面工具函数,新增reqwest依赖用于相关网络处理支持
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.
本次提交代码由Gemini 3.1 Pro、Claude fable 5修改,本次PR由Gemini 3.1 Pro生成
此 PR 引入了什么类型的更改?
目前的行为是什么?
目前在通过第三方插件(例如 Meting API 插件)导入和刷新外部歌单时,当网络请求被拦截、缓存,或是遇到无法预料的解析错误时,播放器层面缺乏直观的追踪链路。同时,
fetch接口中手动附加了Cache-Control导致部分跨域请求触发额外的 OPTIONS 预检请求(CORS),影响了第三方 API 的接入效率;并且针对第三方数据库对象更新时的写法容易引发不可控的旧状态覆盖。新的行为是什么(为 Meting API 插件做的适配优化)?
api.meting.icu等),移除了多余的Cache-Control和Pragma自定义请求头。目前依靠cache: "no-store"以及插件端的随机时间戳已足够绕过缓存,减少了不必要的预检请求(Preflight),极大提升了歌单拉取的兼容性与成功率。console.log。当插件层对接 API 出现解析问题时,能帮助插件开发者(如 Meting 插件)快速追踪断点并定位问题。db.playlists.update的传递形式,并在涉及外部传入数据的地方(如metingApiUrl)全面引入了可选链?.安全调用,使得播放器本体对来自外部插件的非标准化数据有着更好的容错度。build-web.yaml中格式不一致的问题。此 PR 是否包含破坏性变更(Breaking Change)?
其他信息:
此 PR 主要致力于提升 AMLL 播放器本体对
amll-meting-plugin及其它依赖外部第三方 API 拉取歌单的插件的环境兼容度和调试友好度,确保未来的外部歌单同步体验能够更加稳定顺畅。