diff --git a/src/api/types.ts b/src/api/types.ts index e7c6c105..5aad5a3e 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -72,6 +72,8 @@ export interface Subscribe { media_category?: string // 过滤规则组 filter_groups?: string[] + // 下载器 + downloader?: string } // 订阅分享 diff --git a/src/components/dialog/SiteAddEditDialog.vue b/src/components/dialog/SiteAddEditDialog.vue index d9b531c9..1b3d0bbc 100644 --- a/src/components/dialog/SiteAddEditDialog.vue +++ b/src/components/dialog/SiteAddEditDialog.vue @@ -67,10 +67,13 @@ async function loadDownloaderSetting() { try { const result: { [key: string]: any } = await api.get('system/setting/Downloaders') const downloaders = result.data?.value ?? [] - downloaderOptions.value = [{ title: '默认下载器', value: null }, ...downloaders.map((item: { name: any }) => ({ - title: item.name, - value: item.name, - }))] + downloaderOptions.value = [ + { title: '默认', value: null }, + ...downloaders.map((item: { name: any }) => ({ + title: item.name, + value: item.name, + })), + ] } catch (error) { console.error('加载下载器设置失败:', error) } diff --git a/src/components/dialog/SubscribeEditDialog.vue b/src/components/dialog/SubscribeEditDialog.vue index f880a02b..24aaf72b 100644 --- a/src/components/dialog/SubscribeEditDialog.vue +++ b/src/components/dialog/SubscribeEditDialog.vue @@ -57,6 +57,25 @@ const subscribeForm = ref({ // 提示框 const $toast = useToast() +// 下载器选项 +const downloaderOptions = ref<{ title: string; value: string }[]>([]) + +async function loadDownloaderSetting() { + try { + const result: { [key: string]: any } = await api.get('system/setting/Downloaders') + const downloaders = result.data?.value ?? [] + downloaderOptions.value = [ + { title: '默认', value: null }, + ...downloaders.map((item: { name: any }) => ({ + title: item.name, + value: item.name, + })), + ] + } catch (error) { + console.error('加载下载器设置失败:', error) + } +} + // 加载规则组 async function queryFilterRuleGroups() { try { @@ -292,6 +311,7 @@ onMounted(() => { queryFilterRuleGroups() loadDownloadDirectories() getSiteList() + loadDownloaderSetting() if (props.subid) getSubscribeInfo() if (props.default) queryDefaultSubscribeConfig() }) @@ -392,6 +412,26 @@ onMounted(() => { /> + + + + + + + + { persistent-hint /> - - -