mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-28 03:02:34 +08:00
去除多余判断
``` if src_path and download_path != src_path if dest_path and library_path != dest_path ``` 已经能排除`设定 -> 存储 & 目录`中未设置`下载目录`或`媒体库目录`的目录
This commit is contained in:
@@ -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
|
||||
# 本地目录
|
||||
|
||||
Reference in New Issue
Block a user