From 1c00c47a9b3a9d54f2e63d578ead3b0b8993d5bc Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Tue, 29 Oct 2024 00:49:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20#2963=20=E2=9D=94=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98=E7=9A=84=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20`def=20get=5Fdir`=E5=BC=95=E7=94=A8=E5=8F=AA=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E4=B8=8E=E4=B8=8B=E8=BD=BD=E7=9B=B8=E5=85=B3=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=B8=AD,=20=E5=B0=9D=E8=AF=95=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=85=AC=E6=B5=8B=E7=9C=8B=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helper/directory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helper/directory.py b/app/helper/directory.py index 00fa8b96..c9349dfd 100644 --- a/app/helper/directory.py +++ b/app/helper/directory.py @@ -65,7 +65,7 @@ class DirectoryHelper: dirs = self.get_dirs() # 按照配置顺序查找 for d in dirs: - if not d.download_path or not d.library_path: + if not d.download_path: continue # 下载目录 download_path = Path(d.download_path) From f0e4d9bf63658fa6c6cb93ab7d2a8193742a03ad Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Tue, 29 Oct 2024 03:43:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E5=88=A4=E6=96=AD=20```=20if=20src=5Fpath=20and=20download=5Fp?= =?UTF-8?q?ath=20!=3D=20src=5Fpath=20if=20dest=5Fpath=20and=20library=5Fpa?= =?UTF-8?q?th=20!=3D=20dest=5Fpath=20```=20=E5=B7=B2=E7=BB=8F=E8=83=BD?= =?UTF-8?q?=E6=8E=92=E9=99=A4`=E8=AE=BE=E5=AE=9A=20->=20=E5=AD=98=E5=82=A8?= =?UTF-8?q?=20&=20=E7=9B=AE=E5=BD=95`=E4=B8=AD=E6=9C=AA=E8=AE=BE=E7=BD=AE`?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E7=9B=AE=E5=BD=95`=E6=88=96`=E5=AA=92?= =?UTF-8?q?=E4=BD=93=E5=BA=93=E7=9B=AE=E5=BD=95`=E7=9A=84=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helper/directory.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/helper/directory.py b/app/helper/directory.py index c9349dfd..91c9e5d0 100644 --- a/app/helper/directory.py +++ b/app/helper/directory.py @@ -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 # 本地目录 From a1daf884e68dc0b017ea07d67f895a4a27667933 Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:06:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BA=86`=E5=AA=92=E4=BD=93=E5=BA=93=E7=9B=AE?= =?UTF-8?q?=E5=BD=95`=E4=BD=86=E6=B2=A1=E6=9C=89=E8=AE=BE=E7=BD=AE`?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=95=B4=E7=90=86`=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helper/directory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helper/directory.py b/app/helper/directory.py index 91c9e5d0..38801606 100644 --- a/app/helper/directory.py +++ b/app/helper/directory.py @@ -72,8 +72,8 @@ class DirectoryHelper: # 下载目录不匹配, 不符合条件, 通常处理`下载`匹配 if src_path and download_path != src_path: continue - # 媒体库目录不匹配, 不符合条件, 通常处理`整理`匹配 - if dest_path and library_path != dest_path: + # 媒体库目录不匹配, 或监控方式为None(即不自动整理), 不符合条件, 通常处理`整理`匹配 + if dest_path and library_path != dest_path or not d.monitor_type: continue # 本地目录 if local and d.storage != "local":