From 817b5d9c758e44c27dce3969240ffa89de2fada3 Mon Sep 17 00:00:00 2001 From: thsrite Date: Tue, 2 Jul 2024 10:56:00 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A2=9E=E5=8A=A0log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- package.json | 3 ++- plugins/cloudlinkmonitor/__init__.py | 10 +++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9409be9..7c853b7 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/ - [Emby观影报告 v1.5](docs%2FEmbyReporter.md) - 演员订阅 v2.1 - [短剧刮削 v3.2](docs%2FShortPlayMonitor.md) -- 云盘实时监控 v2.4 +- 云盘实时监控 v2.4.1 - 源文件恢复 v1.2 - [微信消息转发 v2.7](docs%2FWeChatForward.md) - 订阅下载统计 v1.5 diff --git a/package.json b/package.json index b1d3e5f..8444a36 100644 --- a/package.json +++ b/package.json @@ -254,11 +254,12 @@ "name": "云盘实时监控", "description": "监控云盘目录文件变化,自动转移链接。", "labels": "云盘", - "version": "2.4", + "version": "2.4.1", "icon": "Linkease_A.png", "author": "thsrite", "level": 1, "history": { + "v2.4.1": "增加log", "v2.4": "修复二级目录", "v2.3": "去除无效变量", "v2.2": "优化配置一二级分类流程", diff --git a/plugins/cloudlinkmonitor/__init__.py b/plugins/cloudlinkmonitor/__init__.py index f30caf3..b8b8881 100644 --- a/plugins/cloudlinkmonitor/__init__.py +++ b/plugins/cloudlinkmonitor/__init__.py @@ -60,7 +60,7 @@ class CloudLinkMonitor(_PluginBase): # 插件图标 plugin_icon = "Linkease_A.png" # 插件版本 - plugin_version = "2.4" + plugin_version = "2.4.1" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -275,8 +275,12 @@ class CloudLinkMonitor(_PluginBase): logger.info("开始全量同步云盘实时监控目录 ...") # 遍历所有监控目录 for mon_path in self._dirconf.keys(): + logger.info(f"开始处理监控目录 {mon_path} ...") + list_files = SystemUtils.list_files(Path(mon_path), settings.RMT_MEDIAEXT) + logger.info(f"监控目录 {mon_path} 共发现 {len(list_files)} 个文件") # 遍历目录下所有文件 - for file_path in SystemUtils.list_files(Path(mon_path), settings.RMT_MEDIAEXT): + for file_path in list_files: + logger.info(f"开始处理文件 {file_path} ...") self.__handle_file(event_path=str(file_path), mon_path=mon_path) logger.info("全量同步云盘实时监控目录完成!") @@ -307,7 +311,7 @@ class CloudLinkMonitor(_PluginBase): with lock: transfer_history = self.transferhis.get_by_src(event_path) if transfer_history: - logger.debug("文件已处理过:%s" % event_path) + logger.info("文件已处理过:%s" % event_path) return # 回收站及隐藏的文件不处理