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