From fcd090803283f94560e547275b2f74e36f82323a Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Sat, 1 Nov 2025 17:56:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(transfer):=20=E4=BF=AE=E5=A4=8D=E6=8C=87?= =?UTF-8?q?=E5=AE=9Apart=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/transfer.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/chain/transfer.py b/app/chain/transfer.py index ad8ea556..9b7ec94e 100755 --- a/app/chain/transfer.py +++ b/app/chain/transfer.py @@ -1116,6 +1116,7 @@ class TransferChain(ChainBase, metaclass=Singleton): file_meta=file_meta) if begin_ep is not None: file_meta.begin_episode = begin_ep + if part is not None: file_meta.part = part if end_ep is not None: file_meta.end_episode = end_ep @@ -1125,10 +1126,10 @@ class TransferChain(ChainBase, metaclass=Singleton): downloadhis = DownloadHistoryOper() if bluray_dir: # 蓝光原盘,按目录名查询 - download_history = downloadhis.get_by_path(str(file_path)) + download_history = downloadhis.get_by_path(file_path.as_posix()) else: # 按文件全路径查询 - download_file = downloadhis.get_file_by_fullpath(str(file_path)) + download_file = downloadhis.get_file_by_fullpath(file_path.as_posix()) if download_file: download_history = downloadhis.get_by_hash(download_file.download_hash) @@ -1441,7 +1442,7 @@ class TransferChain(ChainBase, metaclass=Singleton): for keyword in exclude_words: if keyword and re.search(r"%s" % keyword, file_path, re.IGNORECASE): - logger.debug(f"{file_path} 命中屏蔽词 {keyword}") + logger.warn(f"{file_path} 命中屏蔽词 {keyword}") return True return False @@ -1477,7 +1478,7 @@ class TransferChain(ChainBase, metaclass=Singleton): file_path = save_path / file.name # 如果存在未被屏蔽的媒体文件,则不删除种子 if (file_path.suffix in self.all_exts - and not self._is_blocked_by_exclude_words(str(file_path), transfer_exclude_words) + and not self._is_blocked_by_exclude_words(file_path.as_posix(), transfer_exclude_words) and file_path.exists()): return False