fix #2179 根据路径自动匹配刮削开关

This commit is contained in:
jxxghp
2024-05-26 09:37:42 +08:00
parent bdbb118e55
commit d355e4575d
2 changed files with 13 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "moviepilot",
"version": "1.9.1-1",
"version": "1.9.2",
"private": true,
"bin": "dist/service.js",
"scripts": {

View File

@@ -65,7 +65,7 @@ const transferForm = reactive({
episode_part: '',
episode_offset: null,
min_filesize: 0,
scrape: true,
scrape: false,
})
// 所有媒体库目录
@@ -77,11 +77,22 @@ const targetDirectories = computed(() => {
return [...new Set(directories)]
})
// 监听输入变化
watchEffect(() => {
transferForm.path = props.path ?? ''
transferForm.target = props.target ?? null
})
// 监听目的路径变化,自动查询目录的刮削配置
watch(transferForm, async () => {
if (transferForm.target) {
const directory = libraryDirectories.value.find(item => item.path === transferForm.target)
if (directory) {
transferForm.scrape = directory.scrape ?? false
}
}
})
// 使用SSE监听加载进度
function startLoadingProgress() {
progressText.value = '请稍候 ...'