fix 修复实时监控,只处理指定类型的文件

This commit is contained in:
thsrite
2024-11-07 19:59:40 +08:00
parent 875d070b35
commit fa3d7e3654
2 changed files with 7 additions and 2 deletions

View File

@@ -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)