feat: 添加下载 AI 原声翻译音轨功能 - #5660
Merged
the1812 merged 3 commits intoJul 29, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
此 PR 为视频下载组件增加“音轨选择”能力,使下载 DASH 视频时可以选择包括「AI 原声翻译」在内的不同音轨语言;同时扩展了下载信息结构,并对下拉组件做了小幅增强以避免对象引用变化导致的冗余 change 触发。
Changes:
- 扩展下载数据结构:为
DownloadVideoInputItem增加audioTrack,为DownloadVideoInfo增加audioTracks。 - DASH 拉流参数与解析增强:请求支持携带
cur_language,并从返回数据解析音轨列表。 - 下载面板 UI 增加音轨下拉框,并通过
VDropdown.valueKey降低重复触发变更事件带来的重复请求风险。
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/ui/VDropdown.vue | 新增 valueKey props,用于在选择时按“键值”而非对象引用判断是否变更,减少冗余 change 事件。 |
| registry/lib/components/video/download/types.ts | 在下载输入与下载信息中补充音轨相关类型与字段,供 API/UI 串联使用。 |
| registry/lib/components/video/download/DownloadVideo.vue | 下载面板新增音轨选择下拉框,并把选中的音轨写入测试请求与实际下载请求。 |
| registry/lib/components/video/download/apis/dash.ts | DASH 请求在指定音轨时附带 cur_language,并解析返回的音轨语言列表到 DownloadVideoInfo.audioTracks。 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
关于 VDropdown 的部分,是不是复用一下 keyMapper 判断是否触发 change 就行了,加 valueKey 看起来有点重复 |
the1812
reviewed
Jul 18, 2026
- 在视频下载功能中支持选择音轨 - 更新相关数据结构以包含音轨信息 - 修改界面以显示可用音轨选项
- 将音轨相关字段名称从 audioTracks 修改为 audioLanguages - 更新 DownloadVideoAudioTrack 接口为 DownloadVideoAudioLanguage - 调整相关逻辑以适应新的字段名称和类型
EricZhou05
force-pushed
the
feat/ai-audio-tracks
branch
from
July 22, 2026 07:11
65fb1a3 to
8d99d93
Compare
Author
|
感谢审查~ |
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.
感谢开发者大大这么久的更新~插件超级好用的一直在用!现在顺便给视频下载功能加上了“音轨选择”的支持,现在可以下载「AI 原声翻译」的音轨了。
平时碰到带多音轨(比如 AI 翻译)的视频,默认只能下到原声,这个改动主要是为了把其他音轨也暴露出来供大家选择。
改动
DownloadVideoInfo和 DASH 接口中增加了对audioTracks的解析。请求时如果有指定音轨,会带上cur_language参数。VDropdown.vue,给它加了个valueKey的 props。主要是为了避免下拉框里的对象引用变化时触发一些不必要的冗余change事件(也会导致重复请求)。自查
preview-featuresdist/或其他编译生成的文件pnpm run typepnpm run lint-checkdoc/features/下的自动生成文档在本地环境测试过下载带 AI 翻译的视频,音轨能正常切换并下载成功,麻烦各位大佬帮忙 review 下,看看有没有什么需要优化的地方。