From 97054adc61b5b8ce3c787439ba602b0ca43f9b92 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 19 Nov 2024 20:22:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=89=8B=E5=8A=A8=E6=95=B4=E7=90=86?= =?UTF-8?q?=E6=97=B6=E5=BC=BA=E5=88=B6=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/transfer.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/chain/transfer.py b/app/chain/transfer.py index c26f90c6..846e13ec 100644 --- a/app/chain/transfer.py +++ b/app/chain/transfer.py @@ -389,14 +389,13 @@ class TransferChain(ChainBase): download_hash = download_file.download_hash # 查询整理目标目录 - if not target_directory: - if target_path: - target_directory = self.directoryhelper.get_dir(file_mediainfo, - storage=target_storage, dest_path=target_path) - elif src_match: + if not target_directory and not target_path: + if src_match: + # 按源目录匹配,以便找到更合适的目录配置 target_directory = self.directoryhelper.get_dir(file_mediainfo, storage=file_item.storage, src_path=file_path) else: + # 未指定目标路径,根据媒体信息获取目标目录 target_directory = self.directoryhelper.get_dir(file_mediainfo) # 执行整理