mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-06 16:16:42 +08:00
同步
This commit is contained in:
@@ -173,6 +173,21 @@ watch(
|
|||||||
},
|
},
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 媒体类别和类型变更非空时,将按类型分类和按类别分类置为false
|
||||||
|
watch(
|
||||||
|
[() => props.directory.media_type, () => props.directory.media_category],
|
||||||
|
([newMediaType, newMediaCategory], [oldMediaType, oldMediaCategory]) => {
|
||||||
|
if (newMediaType && newMediaType !== oldMediaType) {
|
||||||
|
props.directory.download_type_folder = false
|
||||||
|
props.directory.library_type_folder = false
|
||||||
|
}
|
||||||
|
if (newMediaCategory && newMediaCategory !== oldMediaCategory) {
|
||||||
|
props.directory.download_category_folder = false
|
||||||
|
props.directory.library_category_folder = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ const addFilterRuleGroup = debounce(() => {
|
|||||||
}, debounceTime)
|
}, debounceTime)
|
||||||
|
|
||||||
// 分享规则
|
// 分享规则
|
||||||
// function shareRules(rules: CustomRule[] | FilterRuleGroup[]) {
|
|
||||||
const shareRules = debounce((rules: CustomRule[] | FilterRuleGroup[]) => {
|
const shareRules = debounce((rules: CustomRule[] | FilterRuleGroup[]) => {
|
||||||
if (!rules || rules.length === 0) return
|
if (!rules || rules.length === 0) return
|
||||||
|
|
||||||
@@ -369,7 +368,7 @@ onMounted(() => {
|
|||||||
</VForm>
|
</VForm>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<VDialog v-model="importCodeDialog" width="60rem" scrollable>
|
<VDialog v-model="importCodeDialog" width="60rem" scrollable>
|
||||||
<ImportCodeDialog v-model="importCodeString" title="导入优先级规则" @close="importCodeDialog = false" />
|
<ImportCodeDialog v-model="importCodeString" title="导入规则" @close="importCodeDialog = false" />
|
||||||
</VDialog>
|
</VDialog>
|
||||||
</VCard>
|
</VCard>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ const selectedBestVersionRuleGroup = ref([])
|
|||||||
// 是否开启订阅定时搜索
|
// 是否开启订阅定时搜索
|
||||||
const enableIntervalSearch = ref(false)
|
const enableIntervalSearch = ref(false)
|
||||||
|
|
||||||
|
// 是否检查本地媒体库是否存在资源
|
||||||
|
const enableDirExistsSearch = ref(false)
|
||||||
|
|
||||||
// 订阅模式选择项
|
// 订阅模式选择项
|
||||||
const subscribeModeItems = [
|
const subscribeModeItems = [
|
||||||
{ title: '自动', value: 'spider' },
|
{ title: '自动', value: 'spider' },
|
||||||
@@ -118,6 +121,9 @@ async function querySubscribeSetting() {
|
|||||||
// 查询洗版规则组
|
// 查询洗版规则组
|
||||||
const result5: { [key: string]: any } = await api.get('system/setting/BestVersionFilterRuleGroups')
|
const result5: { [key: string]: any } = await api.get('system/setting/BestVersionFilterRuleGroups')
|
||||||
if (result5.success) selectedBestVersionRuleGroup.value = result5.data?.value
|
if (result5.success) selectedBestVersionRuleGroup.value = result5.data?.value
|
||||||
|
// 查询检查本地媒体库是否存在资源开关
|
||||||
|
const result6: { [key: string]: any } = await api.get('system/setting/LOCAL_EXISTS_SEARCH')
|
||||||
|
if (result6.success) enableDirExistsSearch.value = result6.data?.value
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
@@ -148,7 +154,12 @@ async function saveSubscribeSetting() {
|
|||||||
selectedBestVersionRuleGroup.value,
|
selectedBestVersionRuleGroup.value,
|
||||||
)
|
)
|
||||||
|
|
||||||
if (result1.success && result2.success && result3.success && result4.success && result5.success)
|
const result6: { [key: string]: any } = await api.post(
|
||||||
|
'system/setting/LOCAL_EXISTS_SEARCH',
|
||||||
|
enableDirExistsSearch.value,
|
||||||
|
)
|
||||||
|
|
||||||
|
if (result1.success && result2.success && result3.success && result4.success && result5.success && result6.success)
|
||||||
$toast.success('订阅设置保存成功')
|
$toast.success('订阅设置保存成功')
|
||||||
else $toast.error('订阅设置保存失败!')
|
else $toast.error('订阅设置保存失败!')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -222,11 +233,19 @@ onMounted(() => {
|
|||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VSwitch
|
<VSwitch
|
||||||
v-model="enableIntervalSearch"
|
v-model="enableIntervalSearch"
|
||||||
label="开启订阅定时搜索"
|
label="订阅定时搜索"
|
||||||
hint="每隔24小时全站搜索,以补全订阅可能漏掉的资源"
|
hint="每隔24小时全站搜索,以补全订阅可能漏掉的资源"
|
||||||
persistent-hint
|
persistent-hint
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VSwitch
|
||||||
|
v-model="enableDirExistsSearch"
|
||||||
|
label="检查本地媒体库资源"
|
||||||
|
hint="检查存储盘是否存在资源,以避免重复下载"
|
||||||
|
persistent-hint
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</VForm>
|
</VForm>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
|
|||||||
Reference in New Issue
Block a user