- 视频(编码:{{ p.video_task.codec_type }} 画质:{{ p.video_task.video_quality }})
+
+ 视频(
+ {{ getVideoQualityName(p.video_task.video_quality) }}
+ -
+ {{ getCodecTypeName(p.video_task.codec_type) }})
+
(跳过)
- 音频(音质:{{ p.audio_task.audio_quality }})
+ 音频({{ getAudioQualityName(p.audio_task.audio_quality) }})
(跳过)
diff --git a/src/panes/DownloadPane/components/ModifyProgressDialogContent.vue b/src/panes/DownloadPane/components/ModifyProgressDialogContent.vue
index 20d94c9..d2fe76c 100644
--- a/src/panes/DownloadPane/components/ModifyProgressDialogContent.vue
+++ b/src/panes/DownloadPane/components/ModifyProgressDialogContent.vue
@@ -10,6 +10,7 @@ import {
} from '../../../bindings'
import { ProgressData } from '../DownloadPane.vue'
import { SelectOption } from 'naive-ui'
+import { getAudioQualityName, getCodecTypeName, getVideoQualityName } from '../../../utils'
type VideoFormatOption = SelectOption & {
videoQuality: VideoQuality
@@ -43,7 +44,7 @@ const videoFormatOptions = computed
(() => {
const videoQuality = videoQualityAndCodecType.video_quality
const codecType = videoQualityAndCodecType.codec_type
return {
- label: `画质:${videoQuality} 编码:${codecType}`,
+ label: `${getVideoQualityName(videoQuality)} - ${getCodecTypeName(codecType)}`,
value: toVideoFormatSelectValue(videoQuality, codecType),
videoQuality: videoQuality,
codecType: codecType,
@@ -64,7 +65,7 @@ const audioFormatOptions = computed(() => {
}
const options: AudioFormatOption[] = availableMediaFormats.value.audio_qualities.map((quality) => {
- return { label: quality, value: quality }
+ return { label: getAudioQualityName(quality), value: quality }
})
return [priorityOption, ...options]
diff --git a/src/utils.tsx b/src/utils.tsx
index a046a12..0f1225c 100644
--- a/src/utils.tsx
+++ b/src/utils.tsx
@@ -4,6 +4,7 @@ import { PhChecks, PhCheck, PhX } from '@phosphor-icons/vue'
import { SelectionEvent } from '@viselect/vue'
import TaskToQueueAnimation from './components/TaskToQueueAnimation.vue'
import { EpisodeInfo } from './panes/SearchPane/components/EpisodeCard.vue'
+import { AudioQuality, CodecType, VideoQuality } from './bindings'
export function extractAid(url: string): number | undefined {
const parsedUrl = new URL(url)
@@ -235,3 +236,49 @@ export function ensureHttps(url: string): string {
}
return url
}
+
+const videoQualityNameMap: Record = {
+ Unknown: '未知',
+ '240P': '240P 极速',
+ '360P': '360P 流畅',
+ '480P': '480P 标清',
+ '720P': '720P 准高清',
+ '720P60': '720P 60帧',
+ '1080P': '1080P 高清',
+ AiRepair: 'AI智能修复',
+ '1080P+': '1080P 高码率',
+ '1080P60': '1080P 60帧',
+ '4K': '4K 超高清',
+ HDR: 'HDR 真彩色',
+ Dolby: '杜比视界',
+ '8K': '8K 超高清',
+}
+
+export function getVideoQualityName(quality: VideoQuality, customMap?: Partial>): string {
+ return customMap?.[quality] ?? videoQualityNameMap[quality]
+}
+
+const audioQualityNameMap: Record = {
+ Unknown: '未知',
+ '64K': '64K',
+ '132K': '132K',
+ '192K': '192K',
+ Dolby: '杜比全景声',
+ HiRes: 'Hi-Res 无损',
+}
+
+export function getAudioQualityName(quality: AudioQuality, customMap?: Partial>): string {
+ return customMap?.[quality] ?? audioQualityNameMap[quality]
+}
+
+const codecTypeNameMap: Record = {
+ Unknown: '未知',
+ Audio: '音频',
+ AVC: 'AVC',
+ HEVC: 'HEVC',
+ AV1: 'AV1',
+}
+
+export function getCodecTypeName(codecType: CodecType, customMap?: Partial>): string {
+ return customMap?.[codecType] ?? codecTypeNameMap[codecType]
+}