From bf36e39f3b0339adc6e1d04b70b8ff09689e2007 Mon Sep 17 00:00:00 2001
From: Attente <19653207+wikrin@users.noreply.github.com>
Date: Sat, 16 Nov 2024 00:28:56 +0800
Subject: [PATCH 1/2] =?UTF-8?q?feat(site):=20=E6=B7=BB=E5=8A=A0=E7=AB=99?=
=?UTF-8?q?=E7=82=B9=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B8=8B=E8=BD=BD=E5=99=A8?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/types.ts | 2 ++
src/components/dialog/SiteAddEditDialog.vue | 28 ++++++++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/src/api/types.ts b/src/api/types.ts
index 80c2b083..82a59f7b 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
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 () => {
-
+
{
+
+
+
From 040790a67296acf2ad663e589faf9ae3dda0d441 Mon Sep 17 00:00:00 2001
From: Attente <19653207+wikrin@users.noreply.github.com>
Date: Sat, 16 Nov 2024 01:41:53 +0800
Subject: [PATCH 2/2] =?UTF-8?q?fix=20=E8=B5=84=E6=BA=90=E6=90=9C=E7=B4=A2?=
=?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=97=B6=E8=AE=BE=E7=BD=AE=E7=9A=84=E4=B8=8B?=
=?UTF-8?q?=E8=BD=BD=E5=99=A8=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/types.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/api/types.ts b/src/api/types.ts
index 82a59f7b..e7c6c105 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -607,6 +607,8 @@ export interface TorrentInfo {
site_proxy: boolean
// 站点优先级
site_order: number
+ // 站点下载器
+ site_downloader?: string
// 种子名称
title?: string
// 种子副标题