diff --git a/src/api/types.ts b/src/api/types.ts index 80c2b083..e7c6c105 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -387,6 +387,8 @@ export interface Site { pri?: number // RSS地址 rss?: string + // 下载器 + downloader?: string // Cookie cookie?: string // ApiKey @@ -605,6 +607,8 @@ export interface TorrentInfo { site_proxy: boolean // 站点优先级 site_order: number + // 站点下载器 + site_downloader?: string // 种子名称 title?: string // 种子副标题 diff --git a/src/components/dialog/SiteAddEditDialog.vue b/src/components/dialog/SiteAddEditDialog.vue index 56f71461..d9b531c9 100644 --- a/src/components/dialog/SiteAddEditDialog.vue +++ b/src/components/dialog/SiteAddEditDialog.vue @@ -60,6 +60,22 @@ const priorityItems = ref( })), ) +// 下载器选项 +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 fetchSiteInfo() { try { @@ -142,6 +158,7 @@ onMounted(async () => { isLimit.value = true if (siteForm.value.apikey) siteType.value = 'api' } + await loadDownloaderSetting() }) @@ -186,7 +203,7 @@ onMounted(async () => { - + { + + +