去除多余判断

```
if src_path and download_path != src_path
if dest_path and library_path != dest_path
```
已经能排除`设定 -> 存储 & 目录`中未设置`下载目录`或`媒体库目录`的目录
This commit is contained in:
Attente
2024-10-29 03:43:57 +08:00
parent 1c00c47a9b
commit f0e4d9bf63

View File

@@ -65,16 +65,14 @@ class DirectoryHelper:
dirs = self.get_dirs()
# 按照配置顺序查找
for d in dirs:
if not d.download_path:
continue
# 下载目录
download_path = Path(d.download_path)
# 媒体库目录
library_path = Path(d.library_path)
# 媒体类型
# 有目录时直接匹配
# 下载目录不匹配, 不符合条件, 通常处理`下载`匹配
if src_path and download_path != src_path:
continue
# 媒体库目录不匹配, 不符合条件, 通常处理`整理`匹配
if dest_path and library_path != dest_path:
continue
# 本地目录