From ce693435df74f419a93cdd15798e94ad870e1379 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 18 Oct 2023 20:50:37 +0800 Subject: [PATCH] fix #900 --- app/plugins/dirmonitor/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/plugins/dirmonitor/__init__.py b/app/plugins/dirmonitor/__init__.py index b0e569c2..e215679d 100644 --- a/app/plugins/dirmonitor/__init__.py +++ b/app/plugins/dirmonitor/__init__.py @@ -315,12 +315,6 @@ class DirMonitor(_PluginBase): logger.debug(f"{event_path} 不是媒体文件") return - # 元数据 - file_meta = MetaInfoPath(file_path) - if not file_meta.name: - logger.error(f"{file_path.name} 无法识别有效信息") - return - # 判断是不是蓝光目录 if re.search(r"BDMV[/\\]STREAM", event_path, re.IGNORECASE): # 截取BDMV前面的路径 @@ -332,6 +326,12 @@ class DirMonitor(_PluginBase): logger.info(f"{event_path} 已整理过") return + # 元数据 + file_meta = MetaInfoPath(file_path) + if not file_meta.name: + logger.error(f"{file_path.name} 无法识别有效信息") + return + # 查询转移目的目录 target: Path = self._dirconf.get(mon_path) # 查询转移方式