mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import {
|
|
OptionsOfMetadata,
|
|
defineComponentMetadata,
|
|
defineOptionsMetadata,
|
|
} from '@/components/define'
|
|
import { hasVideo } from '@/core/spin-query'
|
|
import { DefaultDashExtensions } from './apis/dash'
|
|
|
|
const options = defineOptionsMetadata({
|
|
basicConfig: {
|
|
defaultValue: {},
|
|
displayName: '基础配置',
|
|
hidden: true,
|
|
},
|
|
dashVideoExtension: {
|
|
defaultValue: DefaultDashExtensions.video,
|
|
displayName: 'DASH 视频扩展名',
|
|
},
|
|
dashAudioExtension: {
|
|
defaultValue: DefaultDashExtensions.audio,
|
|
displayName: 'DASH 普通音频扩展名',
|
|
},
|
|
dashFlacAudioExtension: {
|
|
defaultValue: DefaultDashExtensions.flacAudio,
|
|
displayName: 'DASH FLAC 音频扩展名',
|
|
},
|
|
})
|
|
export type Options = OptionsOfMetadata<typeof options>
|
|
export const component = defineComponentMetadata({
|
|
name: 'downloadVideo',
|
|
displayName: '下载视频',
|
|
entry: none,
|
|
reload: none,
|
|
unload: none,
|
|
widget: {
|
|
component: () => import('./Widget.vue').then(m => m.default),
|
|
condition: () => hasVideo(),
|
|
},
|
|
tags: [componentsTags.video],
|
|
options,
|
|
// plugin,
|
|
})
|