From 84465a6536d08ab0258c11fd4c07a9bb844aad0e Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:51:04 +0800 Subject: [PATCH] =?UTF-8?q?`=E4=B8=8D=E6=95=B4=E7=90=86`=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=9A=84`=E4=B8=8B=E8=BD=BD=E8=B7=AF=E5=BE=84`=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E8=A2=AB=E4=B8=8B=E8=BD=BD=E5=99=A8=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E6=BA=90=E5=AD=98=E5=82=A8=E5=99=A8=E7=B1=BB=E5=9E=8B=E5=85=A5?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/transfer.py | 2 +- app/helper/directory.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/chain/transfer.py b/app/chain/transfer.py index 0f54d3f8..933fb50d 100644 --- a/app/chain/transfer.py +++ b/app/chain/transfer.py @@ -407,7 +407,7 @@ class TransferChain(ChainBase): else: # 未指定目标路径,根据媒体信息获取目标目录 target_directory = self.directoryhelper.get_dir(file_mediainfo, - storage=target_storage, + storage=file_item.storage, target_storage=target_storage) # 执行整理 diff --git a/app/helper/directory.py b/app/helper/directory.py index 6731ed62..f3ecb9ae 100644 --- a/app/helper/directory.py +++ b/app/helper/directory.py @@ -68,12 +68,14 @@ class DirectoryHelper: # 电影/电视剧 media_type = media.type.value dirs = self.get_dirs() + # 是否下载器匹配 + not_downloader: bool = src_path or dest_path or target_storage # 已匹配的目录 matched_dirs: List[schemas.TransferDirectoryConf] = [] # 按照配置顺序查找 for d in dirs: # 没有启用整理的目录 - if not d.monitor_type: + if not d.monitor_type and not_downloader: continue # 源存储类型不匹配 if storage and d.storage != storage: