mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-07-06 23:11:43 +08:00
Merge pull request #237 from wikrin/downloader
This commit is contained in:
@@ -387,6 +387,8 @@ export interface Site {
|
|||||||
pri?: number
|
pri?: number
|
||||||
// RSS地址
|
// RSS地址
|
||||||
rss?: string
|
rss?: string
|
||||||
|
// 下载器
|
||||||
|
downloader?: string
|
||||||
// Cookie
|
// Cookie
|
||||||
cookie?: string
|
cookie?: string
|
||||||
// ApiKey
|
// ApiKey
|
||||||
@@ -605,6 +607,8 @@ export interface TorrentInfo {
|
|||||||
site_proxy: boolean
|
site_proxy: boolean
|
||||||
// 站点优先级
|
// 站点优先级
|
||||||
site_order: number
|
site_order: number
|
||||||
|
// 站点下载器
|
||||||
|
site_downloader?: string
|
||||||
// 种子名称
|
// 种子名称
|
||||||
title?: string
|
title?: string
|
||||||
// 种子副标题
|
// 种子副标题
|
||||||
|
|||||||
@@ -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() {
|
async function fetchSiteInfo() {
|
||||||
try {
|
try {
|
||||||
@@ -142,6 +158,7 @@ onMounted(async () => {
|
|||||||
isLimit.value = true
|
isLimit.value = true
|
||||||
if (siteForm.value.apikey) siteType.value = 'api'
|
if (siteForm.value.apikey) siteType.value = 'api'
|
||||||
}
|
}
|
||||||
|
await loadDownloaderSetting()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -186,7 +203,7 @@ onMounted(async () => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="9">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="siteForm.rss"
|
v-model="siteForm.rss"
|
||||||
label="RSS地址"
|
label="RSS地址"
|
||||||
@@ -197,6 +214,15 @@ onMounted(async () => {
|
|||||||
<VCol cols="12" md="3">
|
<VCol cols="12" md="3">
|
||||||
<VTextField v-model="siteForm.timeout" label="超时时间(秒)" hint="站点请求超时时间" persistent-hint />
|
<VTextField v-model="siteForm.timeout" label="超时时间(秒)" hint="站点请求超时时间" persistent-hint />
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol cols="6" md="3">
|
||||||
|
<VSelect
|
||||||
|
v-model="siteForm.downloader"
|
||||||
|
label="下载器"
|
||||||
|
:items="downloaderOptions"
|
||||||
|
hint="此站点使用的下载器"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
<VTabs v-model="siteType" show-arrows class="v-tabs-pill mt-3">
|
<VTabs v-model="siteType" show-arrows class="v-tabs-pill mt-3">
|
||||||
<VTab selected-class="v-tab--selected">
|
<VTab selected-class="v-tab--selected">
|
||||||
|
|||||||
Reference in New Issue
Block a user