From fa3d7e3654b07d265a29c3d8b69eca03c7cabc0d Mon Sep 17 00:00:00 2001 From: thsrite Date: Thu, 7 Nov 2024 19:59:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=EF=BC=8C=E5=8F=AA=E5=A4=84=E7=90=86=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.v2.json | 3 ++- plugins.v2/cloudstrmcompanion/__init__.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.v2.json b/package.v2.json index a0ca683..d893b87 100644 --- a/package.v2.json +++ b/package.v2.json @@ -416,11 +416,12 @@ "name": "云盘Strm助手", "description": "实时监控、定时全量增量生成strm文件。", "labels": "云盘", - "version": "1.0.3", + "version": "1.0.4", "icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/cloudcompanion.png", "author": "thsrite", "level": 1, "history": { + "v1.0.4": "修复实时监控,只处理指定类型的文件", "v1.0.3": "修复重建索引缓存", "v1.0.2": "增加可玩性交互命令", "v1.0": "实时监控、定时全量增量生成strm文件" diff --git a/plugins.v2/cloudstrmcompanion/__init__.py b/plugins.v2/cloudstrmcompanion/__init__.py index a637f0d..805db0b 100644 --- a/plugins.v2/cloudstrmcompanion/__init__.py +++ b/plugins.v2/cloudstrmcompanion/__init__.py @@ -58,7 +58,7 @@ class CloudStrmCompanion(_PluginBase): # 插件图标 plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/cloudcompanion.png" # 插件版本 - plugin_version = "1.0.3" + plugin_version = "1.0.4" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -328,6 +328,10 @@ class CloudStrmCompanion(_PluginBase): if not event.is_directory: if '.fuse_hidden' in event_path: return + # 只处理媒体文件 + if Path(event_path).suffix.lower() not in [ext.strip() for ext in + self._rmt_mediaext.split(",")]: + return # 文件发生变化 logger.debug("文件%s:%s" % (text, event_path)) self.__handle_file(event_path=event_path, mon_path=mon_path)