fix: 修复 resolveByPlugin 函数参数描述,确保音质档位由调用方传入 - #184
Open
PhantomPixel-0418 wants to merge 1 commit into
Open
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.
改动类型
是否包含破坏性变更
改动说明
修复插件音源在请求 URL 时音质被硬编码为
"hq"的问题(#180)。src/services/audioSource.ts中的resolveOnlineUrl函数在兜底调用插件解析时,传入了写死的"hq"作为音质参数,忽略了用户通过设置页面选择的songLevel(如无损 / Hi-Res)。导致即使设置了高音质档位,插件仍只会请求 HQ 档的音频链接。本次改动将硬编码的
"hq"替换为songLevel,使插件音源与官方接口行为一致,均可正确响应用户的音质设置。主要变更:
src/services/audioSource.ts第 174 行:resolveByPlugin(track, "hq", ...)→resolveByPlugin(track, songLevel, ...)关联 Issue
Fix #180
测试情况
downloadSource.ts调用resolveByPlugin时已正确传入 level)。自查清单
pnpm format,并确认pnpm typecheck、pnpm lint通过dev分支提交